{# ---------- МОДАЛ «Удалить участника» ---------- #} {% if user.is_staff or user.is_superuser or can_manage or dept.head.id == user.id %}
{% endif %} {# ---------- МОДАЛ «Добавить участника» ---------- #} {% if user.is_staff or user.is_superuser or can_manage or dept.head.id == user.id %} {% with exclude_ids=members_exclude_ids %} {% endwith %} {% endif %} {# ---------- МОДАЛ «Назначить роль» ---------- #} {% if roles %} {% if user.is_superuser or user.is_staff or can_assign_roles or dept.head.id == user.id %} {% endif %} {% endif %}