From 09fa16d6a8169860735d6b1945240daede2c299d Mon Sep 17 00:00:00 2001 From: numew Date: Fri, 6 Dec 2024 14:51:20 +0100 Subject: [PATCH] include table #3377 --- templates/_partials/_dsfr_table.html.twig | 16 +++ templates/back/base_bo_table.html.twig | 31 ----- templates/back/user/index.html.twig | 139 +++++++++++----------- 3 files changed, 85 insertions(+), 101 deletions(-) create mode 100755 templates/_partials/_dsfr_table.html.twig delete mode 100755 templates/back/base_bo_table.html.twig diff --git a/templates/_partials/_dsfr_table.html.twig b/templates/_partials/_dsfr_table.html.twig new file mode 100755 index 000000000..efde6ed6a --- /dev/null +++ b/templates/_partials/_dsfr_table.html.twig @@ -0,0 +1,16 @@ +
+
+
+ + + + {{tableHead}} + + + + {{tableBody}} + +
+
+
+
diff --git a/templates/back/base_bo_table.html.twig b/templates/back/base_bo_table.html.twig deleted file mode 100755 index 08613c39c..000000000 --- a/templates/back/base_bo_table.html.twig +++ /dev/null @@ -1,31 +0,0 @@ -{% extends 'back/base_bo.html.twig' %} - -{% block content %} - {% block contentTitle %}{% endblock %} - {% block contentFilters %}{% endblock %} - {% block contentDescription %}{% endblock %} - -
-
-
-
- - - - {% block contentTableHead %}{% endblock %} - - - - {% block contentTableBody %}{% endblock %} - -
-
-
-
- -
- {% import '_partials/macros.html.twig' as macros %} - {{ macros.customPagination(pages, searchUser.page, 'back_user_index', searchUser.urlParams) }} -
-
-{% endblock %} \ No newline at end of file diff --git a/templates/back/user/index.html.twig b/templates/back/user/index.html.twig index 4ad0d65e4..54c4162a2 100755 --- a/templates/back/user/index.html.twig +++ b/templates/back/user/index.html.twig @@ -1,83 +1,78 @@ -{% extends 'back/base_bo_table.html.twig' %} +{% extends 'back/base_bo.html.twig' %} {% block title %}Liste des utilisateurs{% endblock %} +{% block content %} +{% include '_partials/_modal_user_edit.html.twig' with { 'currentPage': 'userList' } %} +
+ {% include 'back/breadcrumb_bo.html.twig' with { + 'level2Title': 'Outils admin', + 'level2Link': '', + 'level2Label': '', + 'level3Title': 'Utilisateurs', + 'level3Link': '', + } %} -{% block contentTitle %} - {% include '_partials/_modal_user_edit.html.twig' with { 'currentPage': 'userList' } %} -
- {% include 'back/breadcrumb_bo.html.twig' with { - 'level2Title': 'Outils admin', - 'level2Link': '', - 'level2Label': '', - 'level3Title': 'Utilisateurs', - 'level3Link': '', - } %} - -
-
-
-

Liste des utilisateurs

-

- La liste des agents ayant un compte sur {{ platform.name }}. Vous pouvez filtrer les utilisateurs et exporter la liste. -

-
+
+
+
+

Liste des utilisateurs

+

+ La liste des agents ayant un compte sur {{ platform.name }}. Vous pouvez filtrer les utilisateurs et exporter la liste. +

-
-
-{% endblock %} + + +
-{% block contentFilters %} -
- {% form_theme form 'form/dsfr_theme.html.twig' %} - {{ form_start(form) }} - {{ form_errors(form) }} -
-
- {{ form_row(form.queryUser) }} -
- {% if is_granted('ROLE_ADMIN') %} -
- {{ form_row(form.territory) }} -
- {% endif %} -
- {{ form_row(form.partnerType) }} -
-
- {{ form_row(form.partners) }} -
-
- {{ form_row(form.statut) }} -
-
- {{ form_row(form.role) }} -
- {% if platform.feature_permission_affectation %} +
+ {% form_theme form 'form/dsfr_theme.html.twig' %} + {{ form_start(form) }} + {{ form_errors(form) }} +
+
+ {{ form_row(form.queryUser) }} +
+ {% if is_granted('ROLE_ADMIN') %}
- {{ form_row(form.permissionAffectation) }} -
- {% endif %} -
- Réinitialiser les résultats + {{ form_row(form.territory) }}
+ {% endif %} +
+ {{ form_row(form.partnerType) }}
- {{ form_end(form) }} -
-{% endblock %} - -{% block contentDescription %} -
-
-

{{users|length}} utilisateur{% if users|length > 1%}s{% endif %}

+
+ {{ form_row(form.partners) }}
-
- Exporter les résultats +
+ {{ form_row(form.statut) }}
-
-{% endblock %} +
+ {{ form_row(form.role) }} +
+ {% if platform.feature_permission_affectation %} +
+ {{ form_row(form.permissionAffectation) }} +
+ {% endif %} + +
+ {{ form_end(form) }} +
+ +
+
+

{{users|length}} utilisateur{% if users|length > 1%}s{% endif %}

+
+ +
{% set tableLabel = 'Liste des utilisateurs' %} -{% block contentTableHead %} + +{% set tableHead %} {% if is_granted('ROLE_ADMIN') %} Territoire {% endif %} @@ -92,9 +87,9 @@ Droits d'affectation {% endif %} Actions -{% endblock %} +{% endset %} -{% block contentTableBody %} +{% set tableBody %} {% for user in users %} {% if is_granted('ROLE_ADMIN') %} @@ -139,4 +134,8 @@ {% endfor %} +{% endset %} + +{% include '_partials/_dsfr_table.html.twig' %} + {% endblock %}