{% set countMessages = 0 %}
{% set urlPreview = "/uploads/no_avatar.png" %}
{% if app.user %}
{% if app.user.image.name is not empty %}
{% if file_exists('./uploads/avatars/' ~ app.user.image.name) == true %}
{% set urlPreview = "/uploads/avatars/" ~ app.user.image.name %}
{% endif %}
{% endif %}
{% set countMessages = getCvsCountMessagesDiscussions(app.user.id) %}
{% endif %}
<div class="header header-transparent dark">
<div class="container">
<nav id="navigation" class="navigation navigation-landscape">
<div class="nav-header">
<a href="{{ path('homepage') }}">
{#% set logo = "/uploads/logo-whileresume.png" %}
{% set logo_width = "180" %}
{% set logo_height = "36s" %#}
<img src="{{ logo }}" width="{{ logo_width }}" height="{{ logo_height }}" alt="{{ websitename }}" loading="lazy" style="float:left; margin-top:5px; margin-right:10px;" />
</a>
<div class="nav-toggle"></div>
<div class="mobile_nav">
<ul>
<li class="list-buttons">
<a href="{{ path('app_login') }}"><i class="fas fa-sign-in-alt me-2"></i> Connexion</a>
</li>
</ul>
</div>
</div>
<div class="nav-menus-wrapper">
<ul class="nav-menu" style="margin-top:0px;">
{% if app.user is null %}
<li><a href="{{ path('homepage') }}">Je suis candidat</a></li>
<li><a href="{{ path('cvs_website_homepage_recruiter') }}">Je suis recruteur</a></li>
{% else %}
{% if app.user.typeAccount == "enterprise" %}
<li><a href="{{ path('cvs_website_homepage_recruiter') }}">Accueil</a></li>
{% elseif app.user.typeAccount == "candidate" %}
<li><a href="{{ path('homepage') }}">Accueil</a></li>
{% endif %}
{% endif %}
{% set metiers = getCvsMetiers() %}
<li class="" aria-haspopup="true">
<a href="#">Explorer les metiers <span class="submenu-indicator"></span></a>
{% if metiers is not empty %}
<ul class="nav-dropdown nav-submenu">
{% for mt in metiers %}
<li><a href="{{ path('cvs_website_metier',{'slug':mt.slug}) }}">{{ mt.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
<li><a href="{{ path('cvs_website_candidates') }}">Explorer les candidats</a></li>
<li><a href="{{ path('cvs_website_faq') }}">FAQ</a></li>
</ul>
<ul class="nav-menu nav-menu-social align-to-right" style="margin-top:-5px;">
{% if app.user %}
{% if app.user.typeAccount == "enterprise" %}
<li><a href="{{ path('cvs_gestion_enterprises_dashboard') }}" class="text-primary">Tableau de bord</a></li>
<li>
<div class="btn-group account-drop">
<a href="{{ path('cvs_gestion_enterprises_discussions_list') }}" class="btn btn-order-by-filt">
<i class="fa-regular fa-comments"></i>
{% if countMessages > 0 %}<span class="noti-status"></span>{% endif %}
</a>
</div>
</li>
<li>
<div class="btn-group account-drop">
<button type="button" class="btn btn-order-by-filt" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{ urlPreview }}" class="img-fluid circle" alt="">
</button>
<div class="dropdown-menu pull-right animated flipInX">
<div class="drp_menu_headr bg-primary">
<h4>{{ app.user.name|upper }} {{ app.user.lastname|lower|capitalize }}</h4>
</div>
<ul>
<li>
<a href="{{ path('cvs_gestion_enterprises_upgrade') }}">
<i class="fa fa-shopping-cart"></i> Abonnement
</a>
</li>
<li><a href="{{ path('cvs_gestion_enterprises_profile_profile') }}"><i class="fa fa-user"></i> Mon profil</a></li>
<li><a href="{{ path('app_logout') }}"><i class="fa-solid fa-power-off"></i> Déconnexion</a></li>
</ul>
</div>
</div>
</li>
<li class="list-buttons ms-2">
<a href="{{ path('cvs_gestion_enterprises_invitations_dashboard') }}"><i class="fa-solid fa-cloud-arrow-up me-2"></i> Inviter à postuler</a>
</li>
{% elseif app.user.typeAccount == "candidate" %}
<li><a href="{{ path('cvs_gestion_candidates_dashboard') }}" class="text-primary">Tableau de bord</a></li>
<li>
<div class="btn-group account-drop">
<a href="{{ path('cvs_gestion_candidates_discussions_list') }}" class="btn btn-order-by-filt">
<i class="fa-regular fa-comments"></i>
{% if countMessages > 0 %}<span class="noti-status"></span>{% endif %}
</a>
</div>
</li>
<li>
<div class="btn-group account-drop">
<button type="button" class="btn btn-order-by-filt" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{ urlPreview }}" class="img-fluid circle" alt="">
</button>
<div class="dropdown-menu pull-right animated flipInX">
<div class="drp_menu_headr bg-primary">
<h4>{{ app.user.name|upper }} {{ app.user.lastname|lower|capitalize }}</h4>
</div>
<ul>
<li><a href="{{ path('cvs_gestion_candidates_profile_profile') }}"><i class="fa fa-user"></i> Mon profil</a></li>
<li><a href="{{ path('app_logout') }}"><i class="fa-solid fa-power-off"></i> Déconnexion</a></li>
</ul>
</div>
</div>
</li>
<li class="list-buttons ms-2">
<a href="{{ path('cvs_gestion_candidates_generate_coordinates') }}"><i class="fa-solid fa-cloud-arrow-up me-2"></i> Modifier mon CV</a>
</li>
{% endif %}
{% else %}
<li><a href="{{ path('app_login') }}" class="text-primary">Connexion</a></li>
<li class="list-buttons ms-2"><a href="{{ path('cvs_website_customer_deposer_un_cv') }}">Déposer mon CV</a></li>
{% endif %}
</ul>
</div>
</nav>
</div>
</div>
<!-- End Navigation -->
<div class="clearfix"></div>