{% extends "page.html" %}

{% set organization = c.group_dict %}

{% block subtitle %}{{ c.group_dict.display_name }} - {{ _('Organizations') }}{% endblock %}

{% block breadcrumb_content %}
  <li>{% link_for _('Organizations'), controller='organization', action='index', named_route=group_type + '_index' %}</li>
  {% block breadcrumb_content_inner %}
    <li>{% link_for organization.display_name|truncate(35), controller='organization', action='read', id=organization.name, named_route=group_type + '_read' %}</li>
    <li class="active">{% link_for _('Manage'), controller='organization', action='edit', id=organization.name, named_route=group_type + '_edit' %}</li>
  {% endblock %}
{% endblock %}

{% block content_action %}
  {% if organization and h.check_access('organization_update', {'id': organization.id}) %}
    {% link_for _('View'), controller='organization', action='read', id=organization.name, class_='btn btn-default', icon='eye', named_route=group_type + '_read' %}
  {% endif %}
{% endblock %}

{% block content_primary_nav %}
  {{ h.build_nav_icon(group_type + '_edit', _('Edit'), id=c.group_dict.name) }}
  {{ h.build_nav_icon(group_type + '_bulk_process', _('Datasets'), id=c.group_dict.name) }}
  {{ h.build_nav_icon(group_type + '_members', _('Members'), id=c.group_dict.name) }}
{% endblock %}

{% block secondary_content %}
  {% if organization %}
    {% snippet 'snippets/organization.html', organization=organization %}
  {% else %}
    {{ super() }}
  {% endif %}
{% endblock %}

{% block links %}
  {{ super() }}
  {% include "organization/snippets/feeds.html" %}
{% endblock %}
