{% extends "org-base.html" %} {% from "ui.html" import csrf_field, action, people_list with context %} {% block section %} {% set group_url = "/o/" ~ org.slug ~ "/-/groups/" ~ group.id %} {% set role_labels = [("reader", _("Reader")), ("contributor", _("Contributor"))] %}

{{ _("All groups") }}

{{ group.name }}

{% if group.description %}

{{ group.description }}

{% endif %}

{{ _("Members of the group") }}

{% for member in members %} {% else %} {% endfor %}
{{ _("Account") }}{{ _("Actions") }}
{{ member.display_name }}
@{{ member.username }}
{{ action(group_url ~ "/members/" ~ member.username ~ "/remove", _("Remove"), confirm=_("Remove {name} from the group {group}? They lose the access it gives, unless they have it otherwise.", name=member.display_name, group=group.name), kind="danger") }}
{{ _("Nobody in this group yet.") }}

{{ _("Add a member") }}

{{ csrf_field() }}
{{ people_list("org-people", people) }}

{{ _("Only members of the organization join its groups. Someone who is not a member yet: invite them from the Members tab, checking this group.") }}

{{ _("Spaces and roles") }}

{% for item, role in group_spaces %} {% else %} {% endfor %}
{{ _("Space") }}{{ _("Role") }}{{ _("Actions") }}
{{ item.name }}{% if item.restricted %} {{ _("Restricted") }}{% endif %}
{{ csrf_field() }}
{{ action(group_url ~ "/spaces/" ~ item.slug ~ "/remove", _("Remove"), confirm=_("Remove the access of {group} to {space}? Its members lose it, unless they have it otherwise.", group=group.name, space=item.name), kind="danger") }}
{{ _("This group opens no space yet.") }}
{% if org_spaces %}

{{ _("Give access to a space") }}

{{ csrf_field() }}

{{ _("Each member of the group gets the highest of this role, the one given to them in the space and the organization's default role. A group also opens a restricted space.") }}{% if org.default_space_role != 'none' %} {{ _("On the spaces that are not restricted, the default role already gives {role} access to every member.", role=(_("Reader") if org.default_space_role == 'reader' else _("Contributor"))|lower) }}{% endif %}

{% endif %}

{{ _("General") }}

{{ csrf_field() }}

{{ _("Delete the group") }}

{{ _("Its members lose the access it gives, unless they have it otherwise. Their accounts and the spaces are not touched.") }}

{{ action(group_url ~ "/delete", _("Delete the group"), confirm=_("Delete the group {group}? Its members lose the access it gives, unless they have it otherwise.", group=group.name), kind="danger", small=false) }}
{% endblock %}