{% extends "org-base.html" %} {% from "ui.html" import csrf_field, action, when, reveal_notice with context %} {% block section %}
{% if org.default_space_role == 'none' %}

{{ _("Administrators manage the organization and access all its spaces. Members only access the spaces they are added to, directly or through a group.") }}

{% else %}

{{ _("Administrators manage the organization and access all its spaces. Members access every space that is not restricted as {role} (default role, in the settings), and the spaces they are added to, directly or through a group, with the role given there.", role=(_("Reader") if org.default_space_role == 'reader' else _("Contributor"))|lower) }}

{% endif %} {% set members_url = "/o/" ~ org.slug ~ "/-/members" %} {% set role_labels = [("member", _("Member")), ("admin", _("Administrator"))] %} {% set empty_text = _("No members.") %} {% set add_help = _("For someone without an account yet: invite them by email below.") %} {% include "members-table.html" %}
{% if revealed %}{{ reveal_notice(revealed, _("Invitation link to pass on (valid 14 days, single use):")) }}{% endif %}

{{ _("Invite by email") }}

{{ csrf_field() }}
{% if org_spaces %}
{{ _("Access to spaces (optional)") }}
    {% for item in org_spaces %}
  • {# The default role is a floor: only higher roles are offered. #} {% set floor = org.default_space_role if not item.restricted else "none" %}
  • {% endfor %}
{% endif %} {% if org_groups %}
{{ _("Groups (optional)") }} {% for entry in org_groups %} {% endfor %}

{{ _("The person joins the checked groups as soon as they are a member of the organization. On each space, they get the highest of the role chosen above, the roles of their groups and the default role.") }}

{% endif %}

{{ _("If the address already has an account, access is granted at once. Otherwise, a link lets them create the account.") }}{% if not mail_ready %} {{ _("As email sending is not configured, the link will be shown to you so you can pass it on.") }}{% endif %}

{% if invitations %}

{{ _("Pending invitations") }}

{% for invitation in invitations %}

{{ invitation.email }}

{{ _("Administrator") if invitation.org_role == 'admin' else _("Member") }}
{% set joining = invitation_groups.get(invitation.id, []) %} {% if joining %}

{{ _(pl(joining|length, "Group: {names}", "Groups: {names}"), names=joining|map(attribute="name")|quoted) }}

{% endif %}
{{ _("Expires") }} {{ when(invitation.expires_at, "date") }} {{ action("/o/" ~ org.slug ~ "/-/invitations/" ~ invitation.id ~ "/revoke", _("Cancel"), confirm=_("Cancel the invitation for {email}?", email=invitation.email), kind="danger") }}
{% endfor %}
{% endif %}
{% endblock %}