From 891955cedf9b73ae849d1c84831db7d028671ab1 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 22 Aug 2020 10:01:22 +0200 Subject: [PATCH] Cards for all rights template --- .../templates/permission/all_rights.html | 138 ++++++++++-------- 1 file changed, 78 insertions(+), 60 deletions(-) diff --git a/apps/permission/templates/permission/all_rights.html b/apps/permission/templates/permission/all_rights.html index 9aa6681e..6aec5af1 100644 --- a/apps/permission/templates/permission/all_rights.html +++ b/apps/permission/templates/permission/all_rights.html @@ -1,74 +1,92 @@ {% extends "base.html" %} - +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +{% endcomment %} {% load i18n %} {% load render_table from django_tables2 %} +{% block contenttitle %}{% endblock %} {% block content %} - {% if user.is_authenticated %} -

{% trans "Users that have surnormal rights" %}

- {% render_table special_memberships_table %} +{% if user.is_authenticated %} +
+

+ {% trans "Users that have surnormal rights" %} +

+ {% render_table special_memberships_table %} +
+{% endif %} -
+
+

+ {% trans "Roles description" %} +

+
+ {% if user.is_authenticated %} +
+ +
{% endif %} +
+
+ {% regroup active_memberships by roles as memberships_per_role %} + {% for role in roles %} +
+ -

{% trans "Roles description" %}

- {% if user.is_authenticated %} -
- +
+
+ {% if role.clubs %} +
+ {% trans "Own this role in the clubs" %} {{ role.clubs|join:", " }} +
+ {% endif %} +
    + {% for permission in role.permissions.all %} +
  • + {{ permission }} ({{ permission.get_type_display }} + {{ permission.model }}{% if permission.permanent %}, + {% trans "permanent" %}{% endif %})
  • + {% empty %} + {% trans "No associated permission" %} + {% endfor %} +
- {% endif %} -
- {% regroup active_memberships by roles as memberships_per_role %} - {% for role in roles %} -
-
-

- -

-
- -
-
- {% if role.clubs %} -
- {% trans "Own this role in the clubs" %} {{ role.clubs|join:", " }} -
- {% endif %} -
    - {% for permission in role.permissions.all %} -
  • {{ permission }} ({{ permission.get_type_display }} {{ permission.model }}{% if permission.permanent %}, {% trans "permanent" %}{% endif %})
  • - {% empty %} - {% trans "No associated permission" %} - {% endfor %} -
-
-
-
- {% endfor %} +
+
+ {% endfor %} +
+
{% endblock %} {% block extrajavascript %} - -{% endblock %} + checkbox.change(update); + update(); + }); + +{% endblock %} \ No newline at end of file