ajout des groupes en tant que nom de class body (fixes #31091)

This commit is contained in:
afornerot 2020-11-19 11:15:33 +01:00
parent b7b9ae6ec1
commit e115929020
1 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,13 @@
{% else %} {% else %}
{% set bodystyle="simple" %} {% set bodystyle="simple" %}
{% endif %} {% endif %}
{% if app.user %}
{% for usergroup in app.user.groups %}
{% set bodystyle = bodystyle~" grp-"~usergroup.group.label|replace({" ":"", "'":""}) %}
{% endfor %}
{% endif %}
<body class="{{ bodystyle }}"> <body class="{{ bodystyle }}">
<div id="wrapper"> <div id="wrapper">
{% if useheader and app.request.attributes.get('_route')=='cadoles_core_home' %} {% if useheader and app.request.attributes.get('_route')=='cadoles_core_home' %}