{# -*- engine:django -*- #} {% extends "core/base.html" %} {% load i18n rules any_js material_form static %} {% load render_table from django_tables2 %} {% block browser_title %} {% blocktrans with group=object.name %}Group roles for {{ group }}{% endblocktrans %} {% endblock %} {% block page_title %} {% blocktrans with group=object.name %}Group roles for {{ group }}{% endblocktrans %} {% endblock %} {% block extra_head %} {{ block.super }} {% endblock %} {% block content %} {% url "assigned_group_roles" object.pk as back_url %}

{% has_perm "alsijil.view_my_groups" user as can_view_group_overview %} {% if can_view_group_overview %} arrow_back {% trans "Back to my groups" %} {% endif %} {% has_perm "alsijil.assign_grouprole_for_group" user object as can_assign_group_role %} {% if can_assign_group_role %} assignment_ind {% trans "Assign a role to a person" %} {% endif %}

{% for role in roles %}
{% if can_assign_group_role %} add {% endif %}
{% include "alsijil/group_role/chip.html" with role=role %}
{% if can_assign_group_role %} add {% endif %} {% for assignment in role.assignments.all %} {{ assignment.person }} {% if object not in assignment.groups.all %} ({{ assignment.group_names }}) {% endif %} {% include "alsijil/group_role/assignment_options.html" with assignment=assignment back_url=back_url %} {% empty %}
{% trans "No one assigned." %}
{% endfor %}
{% endfor %}
info {% blocktrans %} You can get some additional actions for each group role assignment if you click on the name of the corresponding person. {% endblocktrans %}
{% for assignment in assignments %} {% endfor %}
{% trans "Group role" %} {% trans "Person" %} {% trans "Start date" %} {% trans "End date" %} {% trans "Actions" %}
{% include "alsijil/group_role/chip.html" with role=assignment.role %} {{ assignment.person }} {{ assignment.date_start }} {{ assignment.date_end|default:"–" }} list {% trans "Actions" %} {% include "alsijil/group_role/assignment_options.html" with assignment=assignment back_url=back_url suffix="-d2" %}
{% endblock %}