{% extends "page.html" %}
{% set dataset_type = h.default_package_type() %}
{% set organization = group_dict %}

{% block subtitle %}{{ group_dict.display_name }} {{ g.template_title_delimiter }} {{ h.humanize_entity_type('organization', group_type, 'page title') or _('Organizations') }}{% endblock %}

{% block breadcrumb_content %}
  <li>{% link_for h.humanize_entity_type('organization', group_type, 'breadcrumb') or _('Organizations'), named_route=group_type+'.index' %}</li>
  <li class="active">{% link_for group_dict.display_name|truncate(35), named_route=group_type+'.read', id=group_dict.name, title=group_dict.display_name %}</li>
{% endblock %}

{% block content_action %}
  {% if h.check_access('package_create') %}
    {% snippet 'snippets/add_dataset.html', dataset_type=dataset_type %}
  {% endif %}
  {% if h.check_access('organization_update', {'id': group_dict.id}) %}
    {% link_for _('Manage'), named_route=group_type+'.edit', id=group_dict.name, class_='btn btn-secondary', icon='wrench' %}
  {% endif %}
{% endblock %}

{% block content_primary_nav %}
  {{ h.build_nav_icon(group_type + '.read', h.humanize_entity_type('package', dataset_type, 'content tab') or _('Datasets'), id=group_dict.name, icon='sitemap') }}
  {{ h.build_nav_icon(group_type + '.members', _('Members'), id=group_dict.name, icon='users') }}
  {{ h.build_nav_icon(group_type + '.about', _('About'), id=group_dict.name, icon='info-circle') }}
{% endblock %}

{% block secondary_content %}
  {% snippet 'organization/snippets/info.html', organization=group_dict, show_nums=true, group_type=group_type, am_following=am_following %}
  {% block organization_facets %}{% endblock %}
{% endblock %}

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