<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet" >
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" ></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg" style="background-color: #0a1e47">
<div class="container-fluid">
<a class="navbar-brand" href="{{ path('app_home') }}">
<img src="{{ asset('img/CDOS_VIENNE_LOGO.jpg') }}" width="75">
</a>
<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>
<span></span>
<span></span>
</button>
<div class="justify-content-between" id="navbarSupportedContent" >
<ul class="navbar-nav ml-auto mb-2 mb-lg-0">
<!-- Tout le monde accès accueil -->
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" aria-current="page" href="{{ path('app_home') }}">
<i class="bi bi-house-fill" style="font-size: 16px;"></i>
Accueil
</a>
</li>
<!--Second ICONE-->
{% if is_granted('ROLE_ADMIN_STRUCTURE') %}
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path ('app_offersadmin') }}">
<i class="bi bi-file-text-fill" style="font-size: 16px;"></i>
Nos offres
</a>
</li>
{% elseif is_granted('') == false or is_granted('ROLE_CANDIDAT') or is_granted('ROLE_SUPER_ADMIN')%}
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path ('app_offers') }}">
<i class="bi bi-file-earmark-fill" style="font-size: 16px;"></i>
Les offres
</a>
</li>
{% endif %}
<!--Third ICONE-->
{# {% if is_granted('ROLE_CANDIDAT') %}#}
{# <li class="nav-item text-uppercase px-5">#}
{# <a class="nav-link text-light" href="#">#}
{# <i class="bi bi-pen-fill bi-10px" style="font-size: 16px;"></i>#}
{# Candidature spontanée#}
{# </a>#}
{# </li>#}
<!--SuperAdmin ICONE-->
{% if is_granted('ROLE_ADMIN_STRUCTURE') %}
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path('app_displayall') }}">
<i class="bi bi-pen-fill bi-10px" style="font-size: 16px;"></i>
Les Candidatures
</a>
</li>
{% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path('app_allcandidature') }}">
<i class="bi bi-person-lines-fill" style="font-size: 16px;"></i>
Les candidatures
</a>
</li>
{% elseif is_granted('ROLE_CANDIDAT') %}
<!--Candidat-->
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path("app_mescandidatures") }}">
<i class="bi bi-person-lines-fill" style="font-size: 16px;"></i>
Mes candidatures
</a>
</li>
{% elseif is_granted('ROLE_ADMIN_STRUCTURE') %}
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path('app_upload') }}">
<i class="bi bi-plus-circle-fill" style="font-size: 16px;"></i>
Ajouter une offre
</a>
</li>
{% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li class="nav-item text-uppercase px-5">
<a class="nav-link text-light" href="{{ path('app_alluser') }}">
<i class="bi bi-person-bounding-box" style="font-size: 16px;"></i>
Les utilisateurs
</a>
</li>
{% endif %}
</ul>
</div>
<!---Bouton déconnecter pour Candidat et Admin Structure-->
{% if is_granted('ROLE_CANDIDAT') or is_granted('ROLE_ADMIN_STRUCTURE') %}
<div class="btn-group dropstart">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-circle"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
{% if is_granted('ROLE_ADMIN_STRUCTURE') %}
<li><a class="dropdown-item" href="{{ path('gestion_structure') }}">Gérer mes structures</a></li>
{% endif %}
<li><a class="dropdown-item" href="{{ path('app_logout') }}">Se déconnecter</a></li>
</ul>
</div>
<!---Bouton pour le super admin-->
{% elseif is_granted('ROLE_SUPER_ADMIN') %}
<div class="btn-group dropstart">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-circle"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="{{ path('app_admin_register') }}">Créer un compte</a></li>
<li><a class="dropdown-item" href="{{ path('app_logout') }}">Se déconnecter</a></li>
</ul>
</div>
{% else %}
<!---Bouton pour le visiteur-->
<div class="btn-group dropstart">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-circle"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="{{ path('app_register') }}">Créer un compte</a></li>
<li><a class="dropdown-item" href="{{ path('app_login') }}">Se connecter</a></li>
</ul>
</div>
{% endif %}
</div>
</nav>
</body>
</html>