<style> .nav-wrap .nav-content-bttn.active{ background:var(--theme-color,#6C3AED) !important; color:#fff !important; border-radius:10px; } .nav-wrap .nav-content-bttn.active i, .nav-wrap .nav-content-bttn.active span{ color:#fff !important; } .nav-wrap .nav-content-bttn.active:hover{ background:var(--theme-color,#6C3AED) !important; color:#fff !important; }</style><nav class="navigation scroll-bar"> <div class="container ps-0 pe-0"> <div class="nav-content"> <div class="nav-wrap bg-white bg-transparent-card rounded-xxl shadow-xss pt-3 pb-1 mb-2 mt-2"> <div class="nav-caption fw-600 font-xssss text-grey-500"><span></span>{{ 'sidebar.discover'|trans({}, 'whr-public') }}</div> <ul class="mb-1 top-content"> <li class="logo d-none d-xl-block d-lg-block"></li> <li> <a href="{% if app.request.locale == 'en' %}{{ path('whileresume_homepage') }}{% else %}{{ path('locale_whileresume_homepage',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font"> <i class="font-xl text-current feather-home me-3"></i> <span>{{ 'sidebar.home'|trans({}, 'whr-public') }}</span> </a> </li> {# Liste publique des offres (dashboard avec filtres) — actif sur toutes les pages /jobs/* #} {% set isOnJobs = app.request.attributes.get('_route') in ['whileresume_jobs_list','locale_whileresume_jobs_list','cvs_application_jobs_filter','locale_cvs_application_jobs_filter','cvs_application_jobs_filter_keyword','locale_cvs_application_jobs_filter_keyword','cvs_application_job_show','locale_cvs_application_job_show'] %} <li{% if isOnJobs %} class="active"{% endif %}> <a href="{% if app.request.locale == 'en' %}{{ path('whileresume_jobs_list') }}{% else %}{{ path('locale_whileresume_jobs_list',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font{% if isOnJobs %} active{% endif %}"> <i class="font-xl text-current feather-briefcase me-3"></i> <span>{{ 'sidebar.jobs'|trans({}, 'whr-public') }}</span> </a> </li> {# Liste publique des entreprises — actif sur toutes les pages /companies/* et /company/* #} {% set isOnCompanies = app.request.attributes.get('_route') in ['whileresume_companies_list','locale_whileresume_companies_list','cvs_application_companies_filter','locale_cvs_application_companies_filter','cvs_application_companies_filter_keyword','locale_cvs_application_companies_filter_keyword','cvs_application_company_show','locale_cvs_application_company_show'] %} <li{% if isOnCompanies %} class="active"{% endif %}> <a href="{% if app.request.locale == 'en' %}{{ path('whileresume_companies_list') }}{% else %}{{ path('locale_whileresume_companies_list',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font{% if isOnCompanies %} active{% endif %}"> <i class="font-xl text-current feather-globe me-3"></i> <span>{{ 'sidebar.companies'|trans({}, 'whr-public') }}</span> </a> </li> </ul> </div> {% if isCandidateUser %} {% endif %} {% if sidebarFiltersCities is defined and sidebarFiltersCities|length > 0 %} <div class="nav-wrap bg-white bg-transparent-card rounded-xxl shadow-xss pt-3 pb-1 mb-2 whr-filter-section" data-page-size="5"> <div class="nav-caption fw-600 font-xssss text-grey-500"><span>{{ 'sidebar.companyFilterCitiesSection'|trans({}, 'whr-public') }}</span></div> {# Input de recherche live #} {% if sidebarFiltersCities|length > 5 %} <div class="px-3 pt-1 pb-2 whr-filter-search-wrap"> <div class="whr-filter-search"> <span class="whr-filter-search-icon"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg> </span> <input type="text" class="whr-filter-search-input" placeholder="{{ 'sidebar.filterSearchCity'|trans({}, 'whr-public') }}" autocomplete="off"> </div> </div> {% endif %} <ul class="mb-1 whr-filter-list"> {% for f in sidebarFiltersCities %} <li class="whr-filter-item" data-index="{{ loop.index0 }}" data-filter-label="{{ f.label }}"{% if loop.index0 >= 5 %} style="display:none"{% endif %}> <a href="{% if app.request.locale == 'en' %}{{ path('cvs_application_companies_filter',{'slug':f.slug}) }}{% else %}{{ path('locale_cvs_application_companies_filter',{'_locale':app.request.locale,'slug':f.slug}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"> {% if f.icon is not empty %} <span class="me-3" style="font-size:18px;line-height:1;display:inline-block;width:24px;text-align:center;">{{ f.icon }}</span> {% else %} <i class="font-sm feather-map-pin me-3 text-grey-500"></i> {% endif %} <span>{{ f.label }}</span> </a> </li> {% endfor %} <li class="whr-filter-empty"><span>{{ 'sidebar.filterNoResults'|trans({}, 'whr-public') }}</span></li> </ul> {# Pagination ← 1/N → #} {% if sidebarFiltersCities|length > 5 %} <div class="px-3 pb-2 pt-1 whr-filter-pager-wrap"> <div class="whr-filter-pager"> <button type="button" class="whr-filter-pager-btn whr-filter-pager-prev" aria-label="{{ 'sidebar.filterPrev'|trans({}, 'whr-public') }}"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="15 18 9 12 15 6"/></svg> </button> <span class="whr-filter-pager-info"><span class="whr-filter-pager-current">1</span>/<span class="whr-filter-pager-total">{{ ((sidebarFiltersCities|length - 1) // 5) + 1 }}</span></span> <button type="button" class="whr-filter-pager-btn whr-filter-pager-next" aria-label="{{ 'sidebar.filterNext'|trans({}, 'whr-public') }}"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="9 18 15 12 9 6"/></svg> </button> </div> </div> {% endif %} </div> {% endif %} {% if sidebarFiltersCities is defined and sidebarFiltersCities|length > 5 %} <style> /* Recherche */ .whr-filter-search{position:relative;display:block} .whr-filter-search-input{ width:100%;padding:6px 10px 6px 28px; border:1px solid #E5E7EB;border-radius:100px; font-size:11.5px;color:#1E1B2E;background:#FAFAFA; font-family:inherit;outline:none;box-sizing:border-box; transition:border-color .15s,background .15s } .whr-filter-search-input:focus{border-color:rgba(108,58,237,.4);background:#fff} .whr-filter-search-input::placeholder{color:#9CA3AF} .whr-filter-search-icon{ position:absolute;left:10px;top:50%;transform:translateY(-50%); color:#9CA3AF;pointer-events:none;display:flex } .whr-filter-search-icon svg{width:11px;height:11px} /* État vide (aucun résultat de recherche) */ .whr-filter-empty{display:none;list-style:none;padding:10px 14px;text-align:center} .whr-filter-empty span{font-size:11px;color:#9CA3AF;font-style:italic} .whr-filter-list.is-empty .whr-filter-empty{display:list-item} /* Pager */ .whr-filter-pager{ display:flex;align-items:center;justify-content:center;gap:8px; padding:4px; } .whr-filter-pager-btn{ display:inline-flex;align-items:center;justify-content:center; width:26px;height:26px; background:transparent;border:1px solid rgba(108,58,237,.25);border-radius:8px; color:var(--theme-color,#6C3AED); font-family:inherit;cursor:pointer; transition:background .15s,border-color .15s,opacity .15s } .whr-filter-pager-btn:hover:not(:disabled){background:#F5F3FF;border-color:var(--theme-color,#6C3AED)} .whr-filter-pager-btn:disabled{opacity:.35;cursor:not-allowed} .whr-filter-pager-btn svg{width:12px;height:12px} .whr-filter-pager-info{ font-size:11.5px;font-weight:600;color:#6B7280; min-width:36px;text-align:center;letter-spacing:.02em } .whr-filter-pager-current{color:var(--theme-color,#6C3AED)} /* Quand la recherche est active, on cache le pager (l'utilisateur voit déjà tous les matches) */ .whr-filter-section.is-searching .whr-filter-pager-wrap{display:none} </style> <script> (function(){ 'use strict'; function whrSlug(s){ if(!s) return ''; var t = String(s); t = t.normalize ? t.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : t; return t.toLowerCase().trim(); } document.querySelectorAll('.whr-filter-section').forEach(function(section){ var pageSize = parseInt(section.getAttribute('data-page-size'), 10) || 5; var list = section.querySelector('.whr-filter-list'); if(!list) return; var items = section.querySelectorAll('.whr-filter-item'); var input = section.querySelector('.whr-filter-search-input'); var pagerWrap = section.querySelector('.whr-filter-pager'); var prevBtn = section.querySelector('.whr-filter-pager-prev'); var nextBtn = section.querySelector('.whr-filter-pager-next'); var currentSpan = section.querySelector('.whr-filter-pager-current'); var totalSpan = section.querySelector('.whr-filter-pager-total'); var total = items.length; var totalPages = Math.max(1, Math.ceil(total / pageSize)); var currentPage = 1; function renderPage(){ var startIdx = (currentPage - 1) * pageSize; var endIdx = startIdx + pageSize; items.forEach(function(it, i){ it.style.display = (i >= startIdx && i < endIdx) ? '' : 'none'; }); if(currentSpan) currentSpan.textContent = currentPage; if(prevBtn) prevBtn.disabled = (currentPage <= 1); if(nextBtn) nextBtn.disabled = (currentPage >= totalPages); list.classList.remove('is-empty'); } function applySearch(query){ var q = whrSlug(query || ''); if(!q){ section.classList.remove('is-searching'); renderPage(); return; } section.classList.add('is-searching'); var visibleCount = 0; items.forEach(function(it){ var label = it.getAttribute('data-filter-label') || ''; var matches = whrSlug(label).indexOf(q) !== -1; it.style.display = matches ? '' : 'none'; if(matches) visibleCount++; }); if(visibleCount === 0){ list.classList.add('is-empty'); } else { list.classList.remove('is-empty'); } } if(prevBtn){ prevBtn.addEventListener('click', function(){ if(currentPage > 1){ currentPage--; renderPage(); } }); } if(nextBtn){ nextBtn.addEventListener('click', function(){ if(currentPage < totalPages){ currentPage++; renderPage(); } }); } if(input){ input.addEventListener('input', function(){ applySearch(input.value); }); } // Init renderPage(); }); })(); </script> {% endif %} <div class="nav-wrap bg-white bg-transparent-card rounded-xxl shadow-xss pt-3 pb-1"> <div class="nav-caption fw-600 font-xssss text-grey-500"><span></span>{{ 'sidebar.account'|trans({}, 'whr-public') }}</div> <ul class="mb-1"> <li class="logo d-none d-xl-block d-lg-block"></li> {% if connectUser %} {% if isCandidateUser %} <li><a href="{% if app.request.locale == "en" %}{{ path('cvs_gestion_candidates_dashboard') }}{% else %}{{ path('locale_cvs_gestion_candidates_dashboard',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"><i class="font-sm feather-grid me-3 text-grey-500"></i><span>{{ 'layout.sidebar.dashboard'|trans({}, 'whr-candidates') }}</span></a></li> {% if app.user.first == 0 %} <li><a href="{% if app.request.locale == "en" %}{{ path('cvs_gestion_candidates_profile_profile') }}{% else %}{{ path('locale_cvs_gestion_candidates_profile_profile',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"><i class="font-sm feather-user me-3 text-grey-500"></i><span>{{ 'layout.sidebar.my_profile'|trans({}, 'whr-candidates') }}</span></a></li> {% endif %} {% else %} <li><a href="{% if app.request.locale == "en" %}{{ path('cvs_gestion_enterprises_dashboard') }}{% else %}{{ path('locale_cvs_gestion_enterprises_dashboard',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2" ><i class="font-sm feather-grid me-3 text-grey-500"></i> <span>{{ 'layout.nav.dashboard'|trans({}, 'whr-enterprises') }}</span></a></li> <li><a href="{% if app.request.locale == "en" %}{{ path('cvs_gestion_enterprises_profile_profile') }}{% else %}{{ path('locale_cvs_gestion_enterprises_profile_profile',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"><i class="font-sm feather-user me-3 text-grey-500"></i><span>{{ 'layout.nav.my_profile'|trans({}, 'whr-enterprises') }}</span></a></li> <li><a href="{% if app.request.locale == "en" %}{{ path('cvs_gestion_enterprises_settings') }}{% else %}{{ path('locale_cvs_gestion_enterprises_settings',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"><i class="font-sm feather-settings me-3 text-grey-500"></i><span>{{ 'layout.nav.settings'|trans({}, 'whr-enterprises') }}</span></a></li> {% endif %} {% if is_granted("ROLE_SUPER_ADMIN") %} <li><a href="{{ path('backoffice_dashboard') }}" class="nav-content-bttn open-font h-auto pt-2 pb-2"><i class="font-sm feather-settings me-3 text-grey-500"></i><span>{{ 'layout.nav.administration'|trans({}, 'whr-enterprises') }}</span></a></li> {% endif %} <li><a href="{{ path('app_logout') }}" class="nav-content-bttn open-font h-auto pt-2 pb-2"><i class="font-sm feather-log-out me-3 text-grey-500"></i><span>{{ 'layout.nav.logout'|trans({}, 'whr-enterprises') }}</span></a></li> {% else %} <li> <a href="{% if app.request.locale == 'en' %}{{ path('app_login') }}{% else %}{{ path('locale_app_login',{'_locale':app.request.locale}) }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"> <i class="font-sm feather-log-in me-3 text-grey-500"></i> <span>{{ 'sidebar.signin'|trans({}, 'whr-public') }}</span> </a> </li> <li> <a href="{% if app.request.locale == 'en' %}{{ path('whileresume_resume_en') }}{% else %}{{ path('whileresume_resume_fr') }}{% endif %}" class="nav-content-bttn open-font h-auto pt-2 pb-2"> <i class="font-sm feather-user-plus me-3 text-grey-500"></i> <span>{{ 'sidebar.signup'|trans({}, 'whr-public') }}</span> </a> </li> {% endif %} </ul> </div> </div> </div></nav>