{% extends "admin/base_site.html" %} {% load i18n admin_static idm_tags %} {% block extrastyle %} {{ block.super }} {% endblock %} {% block extrahead %} {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content %}

Здесь собраны роли, которые пытается отозвать IDM.
Роли находятся на валидации отзыва. Они сгруппированы ниже по разным критериям. На данный момент на валидации отзыва {{ roles|length }} ролей.

За один раз можно отозвать максимум {{ max_roles_count }} ролей

По группе родительской роли

{% for group, roles in grouped_roles.by_parent_group.items|dictsortreversed:"1.roles_count" %} {% endfor %}
Группа Кол-во ролей Кол-во субъектов Действия
{% if group.url %}{{ group.slug }}{% else %}{{ group.slug }}{% endif %} {{ roles|length }} {{ roles.subjects_count }}
{% csrf_token %} {% for role in roles|islice:max_roles_count %} {% endfor %} {% if group.slug %} {% else %} {% endif %}

По родительской роли

{% for parent_id, roles in grouped_roles.by_parent_id.items|dictsortreversed:"1.roles_count" %} {% endfor %}
ID род.роли Кол-во ролей Кол-во субъектов Действия
{{ parent_id }} {{ roles|length }} {{ roles.subjects_count }}
{% csrf_token %} {% if parent_id is not None %} Посмотреть роли {% endif %} {% for role in roles|islice:max_roles_count %} {% endfor %}

По системе

{% for slug, roles in grouped_roles.by_system_slug.items|dictsortreversed:"1.roles_count" %} {% endfor %}
Система Кол-во ролей Кол-во субъектов Действия
{{ slug }} {{ roles|length }} {{ roles.subjects_count }}
{% csrf_token %} Посмотреть роли {% for role in roles|islice:max_roles_count %} {% endfor %}

По типу

{% for ownership, roles in grouped_roles.by_ownership.items|dictsortreversed:"1.roles_count" %} {% endfor %}
Тип Кол-во ролей Кол-во субъектов Действия
{{ ownership }} {{ roles|length }} {{ roles.subjects_count }}
{% csrf_token %} Посмотреть роли {% for role in roles|islice:max_roles_count %} {% endfor %}
{# Если ролей слишком много, не даём отозвать сразу все #} {% if roles|length <= max_roles_count %}
{% csrf_token %} {% for role in roles %} {% endfor %}
{% endif %}
{% endblock %}