From 716bfb8ce169bac54d2c9b085acc7b6997a867ff Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 8 Aug 2025 10:04:35 +0200 Subject: [PATCH] app info(don't work) --- templates/organization/show.html.twig | 34 ++++++++++-------- .../user/application/information.html.twig | 35 +++++++++++++++++++ templates/user/show.html.twig | 7 ++++ 3 files changed, 61 insertions(+), 15 deletions(-) create mode 100644 templates/user/application/information.html.twig diff --git a/templates/organization/show.html.twig b/templates/organization/show.html.twig index bf041c0..2f1790b 100644 --- a/templates/organization/show.html.twig +++ b/templates/organization/show.html.twig @@ -3,26 +3,30 @@ {% block body %}
-

+
{% if organization.logoUrl %} Organization logo {% endif %} - {{ organization.name|title }} - Dashboard

- {% if is_granted("ROLE_SUPER_ADMIN") %} - Gérer - l'organisation - {% if organization.active %} - Désactiver l'organisation - {% else %} - Activer l'organisation +

{{ organization.name|title }} - Dashboard

+
+
+ {% if is_granted("ROLE_SUPER_ADMIN") %} + Gérer + l'organisation + {% if organization.active %} + Désactiver l'organisation + {% else %} + Activer l'organisation + {% endif %} + {% elseif is_granted("ROLE_ADMIN") %} + Gérer mon + organisation {% endif %} - {% elseif is_granted("ROLE_ADMIN") %} - Gérer mon - organisation - {% endif %} +
+
{# USER ROW #}
diff --git a/templates/user/application/information.html.twig b/templates/user/application/information.html.twig new file mode 100644 index 0000000..16e87be --- /dev/null +++ b/templates/user/application/information.html.twig @@ -0,0 +1,35 @@ +{% block body %} + +
+
+
+ {% if application.logoUrl %} + Logo {{ application.name }} + {% endif %} +

{{ application.name|title }}

+
+
+
+
+
+

{{ application.description|default('Aucune description disponible.') }}

+
+
+ {% if is_granted('ROLE_ADMIN') %} +
+
+ + +
+ +
+ {% endif %} +
+
+ +{% endblock %} \ No newline at end of file diff --git a/templates/user/show.html.twig b/templates/user/show.html.twig index 9fa02f2..5fb20f4 100644 --- a/templates/user/show.html.twig +++ b/templates/user/show.html.twig @@ -17,6 +17,13 @@

Aucune organisation associée à cet utilisateur.

+ {% elseif userOrganizations|length == 1 %} + {% for organization in userOrganizations[0].apps %} + {{ dump(userOrganizations) }} + + {# {% include 'user/application/information.html.twig' #} + {# with {'application': application, 'roles' : } %} #} + {% endfor %} {% else %} {% for organization in userOrganizations %} {% include 'user/organization/userOrganizationInformation.html.twig'