<header class="sticky-top">
<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3 text-dark">
<i class="fa fa-bars"></i>
</button>
<ul class="navbar-nav">
{% if bodytitle is defined and bodytitle is not empty %}
<li class="nav-item bodytitle">
<span class="nav-link text-dark">
{{ bodytitle|raw }}
</span>
</li>
{% endif %}
</ul>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown no-arrow">
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small" >{{ app.user.username }}</span>
<i class="fas fa-user-alt"></i>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="#">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Options
</a>
{# <a class="dropdown-item" href="#">#}
{# <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>#}
{# Configuration#}
{# </a>#}
{# <a class="dropdown-item" href="#" data-toggle="modal" data-target="#syncModal">#}
{# <i class="fas fa-sync fa-sm fa-fw mr-2 text-gray-400"></i>#}
{# Synchroniser#}
{# </a>#}
{% if is_granted('ROLE_ADMIN') %}
<span class="dropdown-item-text">
<i class="fas fa-microchip mr-2 text-gray-400"></i>
Token : <br>
{{ app.user.oauthToken }}
</span>
{% endif %}
<div class="dropdown-divider"></div>
{% if is_granted('ROLE_ADMIN') %}
<a class="dropdown-item" href="{{ path('APP_ADMIN_LOGOUT') }}">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Déconnexion
</a>
{% elseif is_granted('ROLE_USER') %}
<a class="dropdown-item" href="{{ path('APP_LOGOUT') }}"
data-toggle="tooltip" data-placement="left" title="Expiration de l'authentification dans {{ app.user.getExpirationInterval|date('%H:%i') }}">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Déconnexion
</a>
{% endif %}
</div>
{% else %}
<a class="nav-link" href="{{ path('APP_LOGIN') }}">
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Connexion</span>
<i class="fas fa-user-alt"></i>
</a>
{% endif %}
</li>
</ul>
</nav>
</header>