{% 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 %}
{% 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 %}Name{% endtrans %}
{# 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 %}Type{% endtrans %}
{# 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 %}Authentication Source{% endtrans %}
{# 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. #}
{% trans %}Remove{% endtrans %}
{% for entity in division.permissions[permission]|map(attribute='entity') %}
{{ entity.name }}
{% if entity.users is defined %}
{# 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 %}
{% 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. #}