{% extends "social/base.html" %} {% macro m_user_list(users, form_action, form_action_label) %} {%- if users %} {%- if is_admin %}
{{ csrf.field() }} {%- endif %} {%- for user in users %} {%- if is_admin %} {%- endif %} {%- endfor %}
{{ user.name }} {{ user.name }} {{ user.email }}
{%- if is_admin %}
{%- endif %} {%- endif %} {% endmacro %} {% block content %}

{{ group.name }}

{{ group.description or '' }}
{#
{{ csrf.field() }} {% if g.user.is_member_of(group) %} {% else %} {% endif %}
#}
{# {% if g.is_manager or g.user.is_admin_of(group) %} admin... {% endif %} #}

{{ _("Group admins") }}

{%- if is_admin %}
{{ csrf.field() }}
{%- endif %} {{ m_user_list(group.admins, 'remove-admin', _('remove from administrators')) }}

{{ _("Group members") }}

{%- if is_admin %}
{{ csrf.field() }}
{%- endif %} {{ m_user_list(group.members, 'remove', _('remove from group')) }} {% endblock %} {% block js %} {% endblock %}