{% extends "user/dashboard.html" %}
{% set group_type = h.default_group_type('group') %}
{% block content_action -%}
{{ super() }}
{{ ui.content_action(h.humanize_entity_type('group', group_type, 'add link') or _('Add Group'), href=h.url_for(group_type ~ '.new'), icon="plus-square") if h.check_access('group_create') }}
{%- endblock %}
{% block page_heading %}
{{ ui.heading(h.humanize_entity_type('group', group_type, 'my label') or _('My Groups'), attrs={"class": "sr-only"}, level=1) }}
{% endblock %}
{% block primary_content_inner %}
{% set groups = h.groups_available(am_member=True, include_dataset_count=True, include_member_count=True) %}
{% if groups %}
{% snippet "group/snippets/group_list.html", groups=groups, show_capacity=True %}
{% else %}
{%- call ui.util.call(ui.empty) -%}
{{ h.humanize_entity_type('group', group_type, 'you not member') or _('You are not a member of any groups.') }}
{{ ui.link(_('Create one now?'), href=h.url_for(group_type ~ '.new')) if h.check_access('group_create')}}
{%- endcall %}
{% endif %}
{% endblock %}