templates/parts/header.html.twig line 1

Open in your IDE?
  1. <header class="sticky-top">
  2.     <!-- Topbar -->
  3.     <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
  4.         <!-- Sidebar Toggle (Topbar) -->
  5.         <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3 text-dark">
  6.             <i class="fa fa-bars"></i>
  7.         </button>
  8.         <ul class="navbar-nav">
  9.             {% if bodytitle is defined and bodytitle is not empty %}
  10.                 <li class="nav-item bodytitle">
  11.                     <span class="nav-link text-dark">
  12.                         {{ bodytitle|raw }}
  13.                     </span>
  14.                 </li>
  15.             {% endif %}
  16.         </ul>
  17.         <!-- Topbar Navbar -->
  18.         <ul class="navbar-nav ml-auto">
  19.             <li class="nav-item dropdown no-arrow">
  20.                 {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  21.                     <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
  22.                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  23.                         <span class="mr-2 d-none d-lg-inline text-gray-600 small" >{{ app.user.username }}</span>
  24.                         <i class="fas fa-user-alt"></i>
  25.                     </a>
  26.                     <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
  27.                          aria-labelledby="userDropdown">
  28.                         <a class="dropdown-item" href="#">
  29.                             <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
  30.                             Options
  31.                         </a>
  32. {#                        <a class="dropdown-item" href="#">#}
  33. {#                            <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>#}
  34. {#                            Configuration#}
  35. {#                        </a>#}
  36. {#                        <a class="dropdown-item" href="#" data-toggle="modal" data-target="#syncModal">#}
  37. {#                            <i class="fas fa-sync fa-sm fa-fw mr-2 text-gray-400"></i>#}
  38. {#                            Synchroniser#}
  39. {#                        </a>#}
  40.                         {% if is_granted('ROLE_ADMIN') %}
  41.                             <span class="dropdown-item-text">
  42.                                 <i class="fas fa-microchip mr-2 text-gray-400"></i>
  43.                                 Token : <br>
  44.                                 {{ app.user.oauthToken }}
  45.                             </span>
  46.                         {% endif %}
  47.                         <div class="dropdown-divider"></div>
  48.                         {% if is_granted('ROLE_ADMIN') %}
  49.                             <a class="dropdown-item" href="{{ path('APP_ADMIN_LOGOUT') }}">
  50.                                 <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
  51.                                 Déconnexion
  52.                             </a>
  53.                         {% elseif is_granted('ROLE_USER') %}
  54.                             <a class="dropdown-item" href="{{ path('APP_LOGOUT') }}"
  55.                                data-toggle="tooltip" data-placement="left" title="Expiration de l'authentification dans {{ app.user.getExpirationInterval|date('%H:%i') }}">
  56.                                 <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
  57.                                 Déconnexion
  58.                             </a>
  59.                         {% endif %}
  60.                     </div>
  61.                 {% else %}
  62.                     <a class="nav-link" href="{{ path('APP_LOGIN') }}">
  63.                         <span class="mr-2 d-none d-lg-inline text-gray-600 small">Connexion</span>
  64.                         <i class="fas fa-user-alt"></i>
  65.                     </a>
  66.                 {% endif %}
  67.             </li>
  68.         </ul>
  69.     </nav>
  70. </header>