diff --git a/templates/header.html.twig b/templates/header.html.twig index c93c00c8329eeffbacee584a760ef2490d3a3374..e9ac8110ed91d020dc74ac60d0523b6fa36459c0 100644 --- a/templates/header.html.twig +++ b/templates/header.html.twig @@ -10,10 +10,12 @@ </div> <p>{{ app.user.login }}</p> - {% if app.user.notifs|length > 0 %} - <a href="{{ path("app_notifications")}}"><img src={{asset('/img/notifs_non_lues.png')}} alt="logo profil" width="35px"/></a> - {% else %} - <a href="{{ path("app_notifications")}}"><img src={{asset('/img/notifs.png')}} alt="logo profil" width="35px"/></a> + {% if not is_granted('ROLE_ADMIN') %} + {% if app.user.notifs|length > 0 %} + <a href="{{ path("app_notifications")}}"><img src={{asset('/img/notifs_non_lues.png')}} alt="logo profil" width="35px"/></a> + {% else %} + <a href="{{ path("app_notifications")}}"><img src={{asset('/img/notifs.png')}} alt="logo profil" width="35px"/></a> + {% endif %} {% endif %} <a href="{{ path("app_modif_user")}}" ><img src={{asset('/img/bonhomme.png')}} alt="logo profil" width="50px"/></a> {% if not is_granted('ROLE_ADMIN') %}