From e115929020979dcf16e5bb91c490fa73b48a9553 Mon Sep 17 00:00:00 2001 From: afornerot Date: Thu, 19 Nov 2020 11:15:33 +0100 Subject: [PATCH] ajout des groupes en tant que nom de class body (fixes #31091) --- .../src/Cadoles/CoreBundle/Resources/views/base.html.twig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig index 45c15fa6..977defb3 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig @@ -41,6 +41,13 @@ {% else %} {% set bodystyle="simple" %} {% endif %} + + {% if app.user %} + {% for usergroup in app.user.groups %} + {% set bodystyle = bodystyle~" grp-"~usergroup.group.label|replace({" ":"", "'":""}) %} + {% endfor %} + {% endif %} +
{% if useheader and app.request.attributes.get('_route')=='cadoles_core_home' %}