123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <a class="navbar-brand" href="{{ path('videotheque_liste') }}">Videothèque</a>
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- {% if not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
- <ul class="navbar-nav me-auto mb-2 mb-lg-0">
- <li class="nav-item">
- <a class="nav-link
- {% if app.request.attributes.get('_route') == 'videotheque_liste' %}active{% endif %}"
- href="{{ path('videotheque_liste') }}">Liste des films</a>
- </li>
- </ul>
- {% endif %}
- {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
- <ul class="navbar-nav me-auto mb-2 mb-lg-0">
- <li class="nav-item">
- <a class="nav-link
- {% if app.request.attributes.get('_route') == 'videothequepersonnelle_maliste' %}active{% endif %}"
- href="{{ path('videothequepersonnelle_maliste') }}">Ma liste à voir</a>
- </li>
- <li class="nav-item">
- <a class="nav-link
- {% if app.request.attributes.get('_route') == 'videotheque_liste' %}active{% endif %}"
- href="{{ path('videotheque_liste') }}">Films</a>
- </li>
- <li class="nav-item">
- <a class="nav-link
- {% if app.request.attributes.get('_route') == 'realisateur_liste' %}active{% endif %}"
- href="{{ path('realisateur_liste') }}">Réalisateurs</a>
- </li>
- {% if is_granted('ROLE_MODERATEUR') %}
- <ul class="navbar-nav">
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownAdmin" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- Administration
- </a>
- <div class="dropdown-menu" aria-labelledby="navbarDropdown">
- {% if is_granted('ROLE_ADMIN') %}
- <a class="dropdown-item" href="{{ path('admin_index') }}">Utilisateurs</a>
- <div class="dropdown-divider"></div>
- {% endif %}
- <a class="dropdown-item" href="{{ path('genre_liste') }}">Liste des genres</a>
- </div>
- </li>
- </ul>
- {% endif %}
- </ul>
- {% endif %}
-
- <ul class="navbar-nav">
- <li class="nav-item">
- <a href="#" class="nav-link" data-bs-toggle="modal" data-bs-target="#modalWindow"><i class="fa fa-info-circle fa-lg text-light nav-link" aria-hidden="true"></i></a>
- <li>
- </ul>
- <ul class="navbar-nav">
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarHelpDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <i class="fa fa-question-circle fa-lg"></i>
- </a>
- {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
- <div class="dropdown-menu dropdown-menu-end p-4" aria-labelledby="navbarHelpDropdown" style="width: 400px;">
- <p><i class="fa fa-bookmark fa-lg text-primary"></i> : Films que l'on souhaite voir. On les retrouve dans "Liste de mes films"</p>
- <p><i class="fa fa-eye fa-lg text-success"></i> : Film qu'on a vu</p>
- <p><i class="fa fa-eye-slash fa-lg text-secondary"></i> : Film qu'on n'a pas vu</p>
- </div>
- {% endif %}
- </li>
- </ul>
- <ul class="navbar-nav">
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarBellDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <i class="fa fa-bell fa-lg"></i>
- </a>
- <div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarBellDropdown" style="width: 400px;">
- <div class="list-group px-4 py-3">
- {{ afficheNouveautes() | raw }}
- </div>
- </div>
- </li>
- </ul>
-
- {#{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}#}
-
- {#{% endif %}#}
- {% if not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
- <ul class="navbar-nav">
- <li class="nav-item"><a class="nav-link" href="{{ path('app_login') }}">Se connecter</a></li>
- </ul>
- {% else %}
- <ul class="navbar-nav">
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarUserDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- {{ app.user.nomComplet }}
- </a>
- <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarUserDropdown">
- <a class="dropdown-item" href="{{ path('user_profil') }}">Profil</a>
- <div class="dropdown-divider"></div>
- <a class="dropdown-item" href="{{ path('app_logout') }}">Se déconnecter</a>
- </div>
- </li>
- </ul>
- {% endif %}
- </div>
- </nav>
|