<div id="user_nav" class="dropdown ml-2 ml-xl-4">
<button type="button" class="btn_popin_contact btn-picto" data-sujet="0" title="Contact">
<i class="icon-mail"></i>
</button>
<button
type="button"
class="user_nav_popover btn-picto"
data-toggle="popover"
data-placement="bottom"
title=""
data-trigger="click" >
<i class="{% if app.user is null %}icon-user-circle{% else %}icon-user-circle-o{% endif %}"></i>
</button>
<div class="popover_content d-none">
<nav class="nav flex-column">
{% if app.user is null %}
<div class="user_infos">
<p class="mb-0">Identifiez-vous</p>
</div>
<a class="nav-link btn_login" href="javascript:void(0)">Se connecter</a>
{% else %}
<div class="user_infos authenticate">
<p class="small text-muted mb-0">Connecté en tant que</p>
<p class="mb-0">{{ app.user.email }}</p>
{% if is_granted('IS_IMPERSONATOR') %}
<a href="{{ impersonation_exit_path(path('homepage') ) }}">Réinitialiser mon profil</a>
{% endif %}
</div>
<a class="nav-link" href="{{ path('mon_compte') }}">Mon compte</a>
{% if is_granted('ROLE_CONSEILLER')%}
<a class="nav-link" href="{{ path('espace_conseiller') }}">Espace conseiller</a>
<a class="nav-link" href="https://sublimons.myshopify.com" target="_blank">La Boutique</a>
{% endif %}
{% if is_granted('ROLE_EDIT')%}
<a class="nav-link" href="{{ path('dashboard') }}" target="_blank">Backoffice</a>
{% endif %}
{% if is_granted('ROLE_SUPER_ADMIN')%}
<a class="nav-link" href="{{ path('homepage') }}?_switch_user=frederic.poulizac@sublimons.com">Switch user</a>
{% endif %}
<a class="nav-link" href="{{ path('app_logout') }}">Se déconnecter</a>
{% endif %}
</nav>
</div>
</div>