templates/_partials/_navbar.html.twig line 1

  1. <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
  2.     <div class="container-fluid">
  3.         <a class="navbar-brand" href="{{ path('app_main') }}">{{ nom_plateforme}}</a>
  4.         <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
  5.             <span class="navbar-toggler-icon"></span>
  6.         </button>
  7.         <div class="collapse navbar-collapse" id="navbarColor01">
  8.             <ul class="navbar-nav me-auto">
  9.                 <li class="nav-item">
  10.                     <a class="nav-link active" href="{{ path('app_main') }}">Accueil
  11.                         <span class="visually-hidden">(current)</span>
  12.                     </a>
  13.                 </li>
  14.                 <li class="nav-item dropdown">
  15.                     <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="" role="button" aria-haspopup="true" aria-expanded="false">Recherche</a>
  16.                     <div class="dropdown-menu">
  17.                         <a class="dropdown-item" href="{{ path('app_search') }}?t=u">Usager</a>
  18.                         <div class="dropdown-divider"></div>
  19.                         <a class="dropdown-item" href="{{ path('app_search') }}?t=p">Parcours</a>
  20.                         <div class="dropdown-divider"></div>
  21.                         <a class="dropdown-item" href="{{ path('app_search') }}?t=e">Entreprise</a>
  22.                     </div>
  23.                 </li>
  24.                 <li class="nav-item">
  25.                     <a class="nav-link" href="{{ path('app_dashboard') }}">Dashboard</a>
  26.                 </li>
  27.                 <li class="nav-item">
  28.                     <a class="nav-link" href="{{ path('app_entreprise_index') }}">Entreprises</a>
  29.                 </li>
  30.                 <li class="nav-item">
  31.                     <a class="nav-link" href="{{ path('app_organisation_index') }}">Organismes</a>
  32.                 </li>
  33.                 <li class="nav-item">
  34.                     <a class="nav-link" href="{{ path('app_template') }}">Templates</a>
  35.                 </li>
  36.                 <li class="nav-item">
  37.                     <a class="nav-link" href="{{ path('app_themes') }}">Thèmes</a>
  38.                 </li>
  39.                 <li class="nav-item dropdown">
  40.                     <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="" role="button" aria-haspopup="true" aria-expanded="false">Parcours</a>
  41.                     <div class="dropdown-menu">
  42.                         <a class="dropdown-item" href="{{ path('app_parcours_index') }}">Formations</a>
  43.                         <div class="dropdown-divider"></div>
  44.                         <a class="dropdown-item" href="{{ path('app_parcours_index') }}">Prestations</a>
  45.                     </div>
  46.                 </li>
  47.             </ul>
  48.             <form class="d-flex">
  49.                 {% if app.user %}
  50.                     <div class="dropdown">
  51.                         <a class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown" href="{{ path('admin') }}" role="button" aria-haspopup="true" aria-expanded="false">{{ app.user.nom|capitalize }} {{ app.user.prenom|capitalize }}</a>
  52.                         <div class="dropdown-menu">
  53.                             {% if is_granted('ROLE_ADMIN')%}
  54.                             <a class="dropdown-item" href="{{ path('admin') }}">Admin</a>
  55.                             {% endif %}
  56.                             <a class="dropdown-item" href="{{ path('app_profile') }}">Profile</a>
  57.                             <div class="dropdown-divider"></div>
  58.                             <a class="dropdown-item" href="{{ path('app_logout') }}">Déconnexion</a>
  59.                         </div>
  60.                     </div>
  61.                 {% else %}
  62.                     <a href="{{ path('app_login') }}" class="btn btn-success">Login</a>
  63.                 {% endif %}
  64.             </form>
  65.         </div>
  66.     </div>
  67. </nav>