From 60476a260ef88acf616bdc8b400c15d8c5e156ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Bouzour=C3=A8ne?= Date: Tue, 21 Jan 2025 16:25:22 +0100 Subject: [PATCH] Permissions: If no sections, do not show list --- views/user_permissions.html | 82 ++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/views/user_permissions.html b/views/user_permissions.html index 98f0df9..23e4f8a 100644 --- a/views/user_permissions.html +++ b/views/user_permissions.html @@ -25,51 +25,57 @@ {% endif %} -
+ {% if Sections %} + - {% for Section in Sections %} -
-
- {{ Section.Name }} -
-
-
- - - - + + {% for Role in Roles %} + - {% endfor %} - + {% for UserRole in UserRoles %} + {% if Section.ID == UserRole.SectionID and Role.ID == UserRole.RoleID %} + selected + {% endif %} + {% endfor %} + > + {{ Role.Name }} + + {% endfor %} + +
- - {% endfor %} + {% endfor %} +
+ +
+
+ {% else %}
- + Pas de section pour le moment
- + {% endif %} {% endblock %}