templates/themesWebsite/blog_cvs/components/header.html.twig line 1

Open in your IDE?
  1. {% set countMessages = 0 %}
  2. {% set urlPreview = "/uploads/no_avatar.png" %}
  3. {% if app.user %}
  4.     {% if app.user.image.name is not empty %}
  5.         {% if file_exists('./uploads/avatars/' ~ app.user.image.name) == true %}
  6.             {% set urlPreview = "/uploads/avatars/" ~ app.user.image.name %}
  7.         {% endif %}
  8.     {% endif %}
  9.     {% set countMessages = getCvsCountMessagesDiscussions(app.user.id) %}
  10. {% endif %}
  11. <div class="header header-transparent dark">
  12.     <div class="container">
  13.         <nav id="navigation" class="navigation navigation-landscape">
  14.             <div class="nav-header">
  15.                 <a href="{{ path('homepage') }}">
  16.                     {#% set logo = "/uploads/logo-whileresume.png" %}
  17.                     {% set logo_width = "180" %}
  18.                     {% set logo_height = "36s" %#}
  19.                     <img src="{{ logo }}" width="{{ logo_width }}" height="{{ logo_height }}" alt="{{ websitename }}" loading="lazy" style="float:left; margin-top:5px; margin-right:10px;" />
  20.                 </a>
  21.                 <div class="nav-toggle"></div>
  22.                 <div class="mobile_nav">
  23.                     <ul>
  24.                         <li class="list-buttons">
  25.                             <a href="{{ path('app_login') }}"><i class="fas fa-sign-in-alt me-2"></i> Connexion</a>
  26.                         </li>
  27.                     </ul>
  28.                 </div>
  29.             </div>
  30.             <div class="nav-menus-wrapper">
  31.                 <ul class="nav-menu" style="margin-top:0px;">
  32.                     {% if app.user is null %}
  33.                         <li><a href="{{ path('homepage') }}">Je suis candidat</a></li>
  34.                         <li><a href="{{ path('cvs_website_homepage_recruiter') }}">Je suis recruteur</a></li>
  35.                     {% else %}
  36.                         {% if app.user.typeAccount == "enterprise" %}
  37.                             <li><a href="{{ path('cvs_website_homepage_recruiter') }}">Accueil</a></li>
  38.                         {% elseif app.user.typeAccount == "candidate" %}
  39.                             <li><a href="{{ path('homepage') }}">Accueil</a></li>
  40.                         {% endif %}
  41.                     {% endif %}
  42.                     {% set metiers = getCvsMetiers() %}
  43.                     <li class="" aria-haspopup="true">
  44.                         <a href="#">Explorer les metiers <span class="submenu-indicator"></span></a>
  45.                         {% if metiers is not empty %}
  46.                             <ul class="nav-dropdown nav-submenu">
  47.                                 {% for mt in metiers %}
  48.                                     <li><a href="{{ path('cvs_website_metier',{'slug':mt.slug}) }}">{{ mt.title }}</a></li>
  49.                                 {% endfor %}
  50.                             </ul>
  51.                         {% endif %}
  52.                     </li>
  53.                     <li><a href="{{ path('cvs_website_candidates') }}">Explorer les candidats</a></li>
  54.                     <li><a href="{{ path('cvs_website_faq') }}">FAQ</a></li>
  55.                 </ul>
  56.                 <ul class="nav-menu nav-menu-social align-to-right" style="margin-top:-5px;">
  57.                     {% if app.user %}
  58.                         {% if app.user.typeAccount == "enterprise" %}
  59.                             <li><a href="{{ path('cvs_gestion_enterprises_dashboard') }}" class="text-primary">Tableau de bord</a></li>
  60.                             <li>
  61.                                 <div class="btn-group account-drop">
  62.                                     <a href="{{ path('cvs_gestion_enterprises_discussions_list') }}" class="btn btn-order-by-filt">
  63.                                         <i class="fa-regular fa-comments"></i>
  64.                                         {% if countMessages > 0 %}<span class="noti-status"></span>{% endif %}
  65.                                     </a>
  66.                                 </div>
  67.                             </li>
  68.                             <li>
  69.                                 <div class="btn-group account-drop">
  70.                                     <button type="button" class="btn btn-order-by-filt" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  71.                                         <img src="{{ urlPreview }}" class="img-fluid circle" alt="">
  72.                                     </button>
  73.                                     <div class="dropdown-menu pull-right animated flipInX">
  74.                                         <div class="drp_menu_headr bg-primary">
  75.                                             <h4>{{ app.user.name|upper }} {{ app.user.lastname|lower|capitalize }}</h4>
  76.                                         </div>
  77.                                         <ul>
  78.                                             <li>
  79.                                                 <a href="{{ path('cvs_gestion_enterprises_upgrade') }}">
  80.                                                     <i class="fa fa-shopping-cart"></i> Abonnement
  81.                                                 </a>
  82.                                             </li>
  83.                                             <li><a href="{{ path('cvs_gestion_enterprises_profile_profile') }}"><i class="fa fa-user"></i> Mon profil</a></li>
  84.                                             <li><a href="{{ path('app_logout') }}"><i class="fa-solid fa-power-off"></i> Déconnexion</a></li>
  85.                                         </ul>
  86.                                     </div>
  87.                                 </div>
  88.                             </li>
  89.                             <li class="list-buttons ms-2">
  90.                                 <a href="{{ path('cvs_gestion_enterprises_invitations_dashboard') }}"><i class="fa-solid fa-cloud-arrow-up me-2"></i> Inviter à postuler</a>
  91.                             </li>
  92.                         {% elseif app.user.typeAccount == "candidate" %}
  93.                             <li><a href="{{ path('cvs_gestion_candidates_dashboard') }}" class="text-primary">Tableau de bord</a></li>
  94.                             <li>
  95.                                 <div class="btn-group account-drop">
  96.                                     <a href="{{ path('cvs_gestion_candidates_discussions_list') }}" class="btn btn-order-by-filt">
  97.                                         <i class="fa-regular fa-comments"></i>
  98.                                         {% if countMessages > 0 %}<span class="noti-status"></span>{% endif %}
  99.                                     </a>
  100.                                 </div>
  101.                             </li>
  102.                             <li>
  103.                                 <div class="btn-group account-drop">
  104.                                     <button type="button" class="btn btn-order-by-filt" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  105.                                         <img src="{{ urlPreview }}" class="img-fluid circle" alt="">
  106.                                     </button>
  107.                                     <div class="dropdown-menu pull-right animated flipInX">
  108.                                         <div class="drp_menu_headr bg-primary">
  109.                                             <h4>{{ app.user.name|upper }} {{ app.user.lastname|lower|capitalize }}</h4>
  110.                                         </div>
  111.                                         <ul>
  112.                                             <li><a href="{{ path('cvs_gestion_candidates_profile_profile') }}"><i class="fa fa-user"></i> Mon profil</a></li>
  113.                                             <li><a href="{{ path('app_logout') }}"><i class="fa-solid fa-power-off"></i> Déconnexion</a></li>
  114.                                         </ul>
  115.                                     </div>
  116.                                 </div>
  117.                             </li>
  118.                             <li class="list-buttons ms-2">
  119.                                 <a href="{{ path('cvs_gestion_candidates_generate_coordinates') }}"><i class="fa-solid fa-cloud-arrow-up me-2"></i> Modifier mon CV</a>
  120.                             </li>
  121.                         {% endif %}
  122.                     {% else %}
  123.                         <li><a href="{{ path('app_login') }}" class="text-primary">Connexion</a></li>
  124.                         <li class="list-buttons ms-2"><a href="{{ path('cvs_website_customer_deposer_un_cv') }}">Déposer mon CV</a></li>
  125.                     {% endif %}
  126.                 </ul>
  127.             </div>
  128.         </nav>
  129.     </div>
  130. </div>
  131. <!-- End Navigation -->
  132. <div class="clearfix"></div>