{% extends "user/dashboard.html" %}
{% set org_type = h.default_group_type('organization') %}
{%- block content_action -%}
{{ ui.content_action(h.humanize_entity_type('organization', org_type, 'add link') or _("Add Organization"), href=h.url_for(org_type ~ '.new')) if h.check_access('organization_create') }}
{%- endblock %}
{%- set page_heading = h.humanize_entity_type('organization', org_type, 'my label') or _('My Organizations') -%}
{% block primary_content_inner %}
{%- call ui.util.call(ui.section, title=page_heading, level=1) -%}
{% set organizations = h.organizations_available(permission='manage_group', include_dataset_count=True, include_member_count=True) %}
{% if organizations %}
{%- call ui.util.call(ui.organization_list) -%}
{%- for organization in organizations -%}
{{ ui.organization(organization=organization) }}
{%- endfor %}
{%- endcall %}
{% else %}
{%- call ui.util.call(ui.empty) -%}
{{ h.humanize_entity_type('organization', org_type, 'you not member') or _('You are not a member of any organizations.') }}
{{ ui.link(_('Create one now?'), href=h.url_for(org_type ~ '.new')) if h.check_access('organization_create') }}
{%- endcall %}
{% endif %}
{%- endcall %}
{% endblock %}