templates/annuaire/_includes/search-options.html.twig line 1

Open in your IDE?
  1. {#{% if lieu | lieuLibelle == 'DEFAULT'  %}
  2.     {% set openOption = '' %}
  3.     {% set openShow = '' %}
  4.  {% else %}
  5.      {% set openOption = 'collapsed' %}
  6.      {% set openShow = 'show' %}
  7. {% endif %}#}
  8. <div class="d-flex flex-wrap mt-3 mb-3 p-3 geoloc">
  9.     <div class="col-12 col-md-4 pb-2 pb-md-0 pe-md-2">
  10.         <select class="form-select" id="searchSelectRegion" onchange="location = this.value;">
  11.             <option value="">
  12.                 {% if lieu | lieuLibelle == 'DEFAULT' %}
  13.                     Régions
  14.                 {% else %}
  15.                     {{ lieu | lieuRegion | lieuLibelle | default('Régions') }}
  16.                 {% endif %}
  17.             </option>
  18.             {% for region in regions %}
  19.                 {% if region | lieuLibelle != 'DEFAULT' and region.regionAdm is not null %}
  20.                     {% if currentRoute == 'annuaire_liste_par_onglet_sup_localisation' %}
  21.                     <option value="{{ path(
  22.                         'annuaire_liste_par_onglet_sup_localisation',
  23.                         {'niveauOnglet': niveauOnglet, 'sousTypeOnglet': sousTypeOnglet, 'localisation': region.slug}
  24.                     ) }}">
  25.                     {% else %}
  26.                         <option value="{{ currentURL }}/{{ region.slug }}{{ getQueryStringSafe }}">
  27.                     {% endif %}
  28.                     {{ region | lieuLibelle }}
  29.                     </option>
  30.                 {% endif %}
  31.             {% endfor %}
  32.         </select>
  33.     </div>
  34.     <div class="col-12 col-md-4 pb-2 pb-md-0 pe-md-2 ps-md-2">
  35.         {% if departements %}
  36.             <select class="form-select" id="searchSelectDepartement" onchange="location = this.value;">
  37.                 <option value="">
  38.                     {% if lieu.slug == "enseignement-francais" or lieu.slug == "enseignement-a-letranger" %}
  39.                         Pays
  40.                     {% else %}
  41.                         {{ lieu | lieuDepartement | lieuLibelle | default('Départements') }}
  42.                     {% endif %}
  43.                 </option>
  44.                 {% for departement in departements %}
  45.                     <option value="{{ currentURL }}/{{ departement.slug }}{{ getQueryStringSafe }}">
  46.                         {{ departement | lieuLibelle }}
  47.                     </option>
  48.                 {% endfor %}
  49.             </select>
  50.         {% else %}
  51.             <select class="form-select d-none d-md-block" id="searchSelectDepartement" disabled>
  52.                 <option value="">
  53.                     Départements
  54.                 </option>
  55.             </select>
  56.         {% endif %}
  57.     </div>
  58.     <div class="col-12 col-md-4 ps-md-2">
  59.         {% if villes %}
  60.             <select class="form-select" id="searchSelectVille" onchange="location = this.value;">
  61.                 <option value="">{{ lieu | lieuVille | lieuLibelle | default('Villes') }} ({{villes | length}})</option>
  62.                 {% for ville in villes %}
  63.                     <option value="{{ currentURL }}/{{ ville.slug }}{{ getQueryStringSafe }}"
  64.                             {% if loop.index > 80 %}rel="nofollow"{% endif %}>
  65.                         {{ ville | lieuLibelle }}
  66.                     </option>
  67.                 {% endfor %}
  68.             </select>
  69.         {% else %}
  70.             <select class="form-select d-none d-md-block" id="searchSelectVille" disabled>
  71.                 <option value="">Villes</option>
  72.             </select>
  73.         {% endif %}
  74.     </div>
  75. </div>
  76. {#<div class="search-mobile {{ openOption }}" data-bs-toggle="collapse" data-bs-target="#searchOptions"><p>Filtres</p></div>
  77. <div class="search-options collapse {{ openShow }}" id="searchOptions">
  78. {% if app.request.attributes.get('_route') == "annuaire_liste" or app.request.attributes.get('_route') == "annuaire_quoi" %}
  79.     <div class="localisation">
  80.         <h2>Localisations</h2>
  81.         <ul class="navbar region">
  82.             <li class="dropdown">
  83.                 <a id="searchDropdownRegion" class="title" href="javascript:void(0)" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
  84.                     {% if lieu | lieuLibelle == 'DEFAULT' %}
  85.                         Régions
  86.                     {% else %}
  87.                         {{ lieu | lieuRegion | lieuLibelle | default('Régions') }}
  88.                     {% endif %}
  89.                 </a>
  90.                 <ul class="dropdown-menu show" aria-labelledby="searchDropdownRegion" #}{#data-simplebar="init"#}{#>
  91.                     {% for region in regions %}
  92.                         {% if region | lieuLibelle != 'DEFAULT' and region.regionAdm is not null %}
  93.                         <li>
  94.                             <a href="{{ pathBuilder.buildAnnuaire(quoi, region) }}">{{ region | lieuLibelle }}</a>
  95.                         </li>
  96.                         {% endif %}
  97.                     {% endfor %}
  98.                 </ul>
  99.             </li>
  100.         </ul>
  101.         <ul class="navbar">
  102.             <li class="dropdown">
  103.                 <a id="searchDropdownDepartement" class="title" href="javascript:void(0)" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
  104.                     {{ lieu | lieuDepartement | lieuLibelle | default('Départements') }}
  105.                 </a>
  106.                 <ul class="dropdown-menu show" aria-labelledby="searchDropdownDepartement">
  107.                     {% for departement in departements %}
  108.                         <li>
  109.                             <a href="{{ pathBuilder.buildAnnuaire(quoi, departement) }}">{{ departement | lieuLibelle }}</a>
  110.                         </li>
  111.                     {% endfor %}
  112.                 </ul>
  113.             </li>
  114.         </ul>
  115.         <ul class="navbar ville">
  116.             <li class="dropdown">
  117.                 <a id="searchDropdownVille" class="title" href="javascript:void(0)" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
  118.                     {{ lieu | lieuVille | lieuLibelle | default('Villes') }}
  119.                 </a>
  120.                 <ul class="dropdown-menu show" id="dropdown-menu-villes" aria-labelledby="searchDropdownVille">
  121.                     <li class="search-in-list"><input id="villeListInput" type="text" placeholder="Rechercher une ville ..." autofocus="autofocus"></li>
  122.                     {% for ville in villes %}
  123.                         <li><a href="{{ pathBuilder.buildAnnuaire(quoi, ville) }}">{{ ville | lieuLibelle }}</a></li>
  124.                     {% endfor %}
  125.                 </ul>
  126.             </li>
  127.         </ul>
  128.     </div>
  129. {% else %}
  130. {% endif %}
  131. </div>#}
  132. {# <div class="search-mobile search-mobile-bg-{{quoi.slug}}"><p>Filtres</p></div> #}