From 9b06ccc3e6466fe4f315ee9c6b21af8f4c3735e8 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 7 Mar 2022 11:13:11 +0100 Subject: [PATCH 1/3] user admin: use flex-table and flex-bloc in twig --- .../Resources/views/User/index.html.twig | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig index 53bd89482..a1f55e7d3 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig @@ -1,60 +1,60 @@ {% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %} {% block admin_content -%} - {% embed '@ChillMain/CRUD/_index.html.twig' %} - {% block table_entities_thead_tr %} - {{ 'crud.admin_user.index.is_active'|trans }} - {{ 'crud.admin_user.index.usernames'|trans }} - {{ 'crud.admin_user.index.mains'|trans }} -   - {% endblock %} - {% block table_entities_tbody %} - {% for entity in entities %} - - + +

{{"Users"|trans}}

+ {% for entity in entities %} +
+
+
+
+ {{ entity.label }} {% if entity.isEnabled %} {% else %} {% endif %} - - - {{ entity.username }} -
- {{ entity.label }} -
- {{ entity.email }} - - +
+
{{ entity.email }}
+
+
+
+ login: {{ entity.username|e('html_attr') }} +
+
{% if entity.userJob %} - {{ entity.userJob.label|localize_translatable_string }} -
+ {{ entity.userJob.label|localize_translatable_string }} {% endif %} +
+
+
+
{% if entity.mainScope %} - {{ entity.mainScope.name|localize_translatable_string }} -
+ {{ entity.mainScope.name|localize_translatable_string }} {% endif %} {% if entity.mainCenter %} - {{ entity.mainCenter.name }} + , {{ entity.mainCenter.name }} {% endif %} - - -
    +
+
+
+
    +
  • + +
  • +
  • + +
  • + {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
  • - +
  • -
  • - -
  • - {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %} -
  • - -
  • - {% endif %} -
- - - {% endfor %} - {% endblock %} - {% endembed %} -{% endblock %} + {% endif %} + +
+
+ +
+ {% endfor %} + +{% endblock %} \ No newline at end of file From 17e83deb55f7e652acaaec5c5031e655fa539345 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 8 Mar 2022 09:46:41 +0100 Subject: [PATCH 2/3] User admin: put pagination --- src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig index a1f55e7d3..5a558b6a0 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig @@ -57,4 +57,6 @@ {% endfor %} + {{ chill_pagination(paginator) }} + {% endblock %} \ No newline at end of file From 2c55cfe1dc01bef84e1b211f54f5526a6af57ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 21 Mar 2022 11:41:16 +0100 Subject: [PATCH 3/3] by default, translate menu items --- .../ChillMainBundle/Resources/views/Menu/verticalMenu.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/Menu/verticalMenu.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Menu/verticalMenu.html.twig index 51be6c2c3..e15e64374 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Menu/verticalMenu.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Menu/verticalMenu.html.twig @@ -27,7 +27,7 @@ {% for menu in menus %} - {{ menu.label|upper }} + {{ menu.label|trans|upper }} {% endfor %}