{% extends "base.html" %} {% import "macros.html" as macros with context %} {% block title %}{{ site_name }}: {{ division.name }}{% endblock title %} {% block content %}

{{ division.name }}

{# TRANS: A header on the division administration page for selecting how attribute values should be transformed. Frankly, it isn't a good name in English and I mean to change it later on. #}

{% trans %}Attribute Transformers{% endtrans %}

{{ transformer_form.form_id(value='transformer') }} {{ macros.render_input(transformer_form.attribute) }} {{ macros.render_input(transformer_form.transformer, disabled=True) }} {{ transformer_form.csrf_token }}
{% for permission in (PermissionType.submit, PermissionType.review, PermissionType.pay, PermissionType.audit, PermissionType.admin) %}

{{ permission }}s

{# TRANS: A column heading in a table showing which people/groups are granted which permissions. This can either be a name of a person/pilot, or the name of a group. #} {# TRANS: A column heading in a table that lists the people/groups with a certain permission in a division (like submitting, reviewing, etc). This will only be two values (in English), 'User' or 'Group'. #} {# TRANS: A column heading in a table that lists the people/groups that have been granted a permission in a division. This column shows how the app know about this person/group, like through TEST Auth, or Brave Core, or through Eve's Single Sign On service. #} {# TRANS: This is heading in a list of users/groups with a certain permission in a division. In this column is a button for each row, that will remove the permission for that person/group. #} {% for entity in division.permissions[permission]|map(attribute='entity') %} {% if entity.users is defined %} {% else %} {# TRANS: In a list of users and groups granted a permission, if it's a group, this will be displayed. The number of users in the group is shown in parentheses. #} {% endif %} {% endfor %}
{% trans %}Name{% endtrans %}{% trans %}Type{% endtrans %}{% trans %}Authentication Source{% endtrans %}{% trans %}Remove{% endtrans %}
{{ entity.name }} {# TODO: Localize num_users. See entity_table.hbs for corresponding Handlebars template. #} {# TRANS: In a list of users and groups granted a permission, if it's a group, this will be displayed. The number of users in the group is shown in parentheses. #} {% trans num_users = entity.users|length %}Group ({{ num_users }}){% endtrans %} {% trans %}User{% endtrans %}{{ entity.authmethod }}
{{ entity_form.csrf_token() }} {{ entity_form.id_(value=entity.id) }} {{ entity_form.permission(value=permission.value) }} {{ entity_form.action(value='delete') }} {{ entity_form.form_id }}
{# TRANS: This is a button for adding a specified user or group to the list of users and groups granted a permission in a division. #}
{{ entity_form.csrf_token() }} {{ entity_form.action(value="add") }} {{ entity_form.permission(value=permission.name) }} {{ entity_form.id_() }} {{ entity_form.form_id }}
{% endfor %}
{% endblock content %}