{% extends "user/dashboard.html" %}

{% block dashboard_activity_stream_context %}{% endblock %}

{% block page_primary_action %}
  {% if h.check_access('group_create') %}
    {% link_for _('Add Group'), controller='group', action='new', class_="btn btn-primary", icon="plus-sign-alt" %}
  {% endif %}
{% endblock %}

{% block primary_content_inner %}
  <h2 class="hide-heading">{{ _('My Groups') }}</h2>
  {% set groups = h.groups_available(am_member=True) %}
  {% if groups %}
    <div class="wide">
      {% snippet "group/snippets/group_list.html", groups=groups %}
    </div>
  {% else %}
    <p class="empty">
      {{ _('You are not a member of any groups.') }}
      {% if h.check_access('group_create') %}
        {% link_for _('Create one now?'), controller='group', action='new' %}
      {% endif %}
    </p>
  {% endif %}
{% endblock %}
