From 26727212350a8a61816e67b60d60f1def783e87a Mon Sep 17 00:00:00 2001 From: Rida Lali Date: Fri, 21 Aug 2020 08:18:00 +0200 Subject: [PATCH] Add blocks with collapse animation instead of display all --- .../templates/permission/all_rights.html | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/apps/permission/templates/permission/all_rights.html b/apps/permission/templates/permission/all_rights.html index 827532f9..9aa6681e 100644 --- a/apps/permission/templates/permission/all_rights.html +++ b/apps/permission/templates/permission/all_rights.html @@ -19,28 +19,40 @@ {% trans "Filter with roles that I have in at least one club" %} - {% endif %} + {% endif %} +
+ {% regroup active_memberships by roles as memberships_per_role %} + {% for role in roles %} +
+
+

+ +

+
-
    - {% regroup active_memberships by roles as memberships_per_role %} - {% for role in roles %} -
  • - {{ role }} {% if role.weirole %}(Pour le WEI){% endif %} {% if role.for_club %}(Pour le club {{ role.for_club }} uniquement){% endif %} - {% if role.clubs %} -
    - {% trans "Own this role in the clubs" %} {{ role.clubs|join:", " }} +
    +
    + {% 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 %} -
      - {% 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 %}