templates/front/Moteur/destinations_v2.html.twig line 1

Open in your IDE?
  1. {% if destinations is defined %}
  2.     {% if type == "select" %}
  3.         <select class="selectpicker recherche-lieu radius-none" name="destination" multiple  data-max-options="1" title="{{ 'menu.recherche.ou_aller' |trans({},'app') |raw }}">
  4.             <option class="ville" value="2" selected> {{ "menu.recherche.n_importe_ou" |trans({},'app') |raw }}</option>
  5.             {% for pays in destinations %}
  6.                 {% for type in pays.children %}
  7.                     {% if type.children is not null %}
  8.                         <optgroup label="" data-max-options="1">
  9.                             <option value="{{ type.id_iresa }}" {% if id == type.id_iresa %}selected{% endif %}>{{ type.name }}</option>
  10.                             {% for gregion in type.children %}
  11.                                 {% if gregion.children is not null %}
  12.                                     {% for region in gregion.children %}
  13.                                         {% if region.children is not null %}
  14.                                             <option class="region" value="{{ region.id_iresa }}" {% if id == region.id_iresa %}selected{% endif %}> {{ region.name }}</option>
  15.                                             
  16.                                         {% endif %}
  17.                                     {% endfor %}
  18.                                 {% endif %}
  19.                             {% endfor %}
  20.                         </optgroup>
  21.                     {% endif %}
  22.                 {% endfor %}
  23.             {% endfor %}
  24.         </select>
  25.     {% else %}
  26.         {% set nestedMenu = '' %}
  27.         {% for pays in destinations %}
  28.             <ul id="menu-destinations" class="sub-menu sub-menu-1 menu-destination">
  29.                 <li class="col-md-12 col-sm-12 col-xs-12 mega-menu">
  30.                     <div class="grid-container">
  31.                         <div class="column left-column hidden-xs">
  32.                             <ul>
  33.                                 {% for type in pays.children %}
  34.                                 {% if type.children is not null %}
  35.                                     <li>
  36.                                         <a class="destination-type" data-menu="{{  type.canonical }}" href="{{ path('ac_platform_destination_slug', {'slug': type.canonical }) }}">
  37.                                             {{  type.name }}
  38.                                             
  39.                                         </a>
  40.                                         {% set nestedMenu = nestedMenu ~ '<div class="nested-menu" id="menu-' ~ type.canonical ~ '">' %}    
  41.                                         {% for gregion in type.children %}
  42.                                             {% if gregion.children is not null %}
  43.                                                     {% for region in gregion.children %}
  44.                                                         {% if region.children is not null %}
  45.                                                             {% set link = '<a href="' ~ path('ac_platform_destination_slug', {'slug': region.canonical }) ~'" class="link">' ~ region.name ~ '</a>' %}
  46.                                                             {% set nestedMenu = nestedMenu ~ link %}
  47.                                                            
  48.                                                         {% endif %}
  49.                                                     {% endfor %}
  50.                                             {% endif %}
  51.                                         {% endfor %}
  52.                                         {% set nestedMenu = nestedMenu ~ '</div>' %}
  53.                                     </li>
  54.                                 {% endif %}
  55.                                 {% endfor %}
  56.                                 {# lien By Ateya #}
  57.                                 <li>
  58.                                     <a class="destination-type" data-menu="byateya" href="{{ path('ac_platform_theme', {'slug': 'residences-by-ateya', 'id': 32, 'duree': 7 }) }}">
  59.                                         <em>by ATEYA</em>
  60.                                     </a>
  61.                                     {% 
  62.                                         set cazelle_url = slug_path_by_id(70, 'Residence', app.request.locale) 
  63.                                     %}
  64.                                     {% 
  65.                                     set byAteyaResidences = '<a href="' ~ cazelle_url ~'" class="link">Le Domaine des Cazelles<br/><small>Cajarc / Cahors</small></a>
  66.                                     <a href="' ~ path('ac_platform_produit', {'slug': 'le-hameau-des-sources-by-ateya' , 'id': 286}) ~'" class="link">Le Hameau des Sources<br/><small>Montbrun les Bains</small></a>
  67.                                     <a href="' ~ path('ac_platform_produit', {'slug': 'le-domaine-du-golf-by-ateya' , 'id': 2}) ~'" class="link">Le Domaine du Golf<br/><small>Fabrègues / Montpellier</small></a>
  68.                                     <a href="' ~ path('ac_platform_produit', {'slug': 'le-claux-du-puits-by-ateya' , 'id': 37}) ~'" class="link">Le Claux du Puits<br/><small>Saint-Trinit / Pays de Sault</small></a>
  69.                                     <a href="' ~ path('ac_platform_produit', {'slug': 'maison-au-golf-de-la-cabre-d-or-by-ateya' , 'id': 166}) ~'" class="link">Maison au Golf de la Cabre d\'Or<br/><small>Cabriès / Aix-en-Provence</small></a>
  70.                                     <a href="' ~ path('ac_platform_produit', {'slug': 'les-appartements-du-clos-de-la-chartreuse-by-ateya' , 'id': 327}) ~'" class="link">Les Appartements du Clos de la Chartreuse by Ateya<br/><small>Aix-en-Provence</small></a>
  71.                                     <a href="' ~ path('ac_platform_produit', {'slug': 'les-appartements-d-etoiles-d-orion-by-ateya' , 'id': 342}) ~'" class="link">Les Appartements d\'Etoiles d\'Orion *** by Ateya<br/><small>Orcières Merlette</small></a>' 
  72.                                     %}
  73.                                     {% set nestedMenu = nestedMenu ~ '<div class="nested-menu" id="menu-byateya">' ~ byAteyaResidences ~'</div>' %}    
  74.                                 </li>
  75.                             </ul>
  76.                         </div>
  77.                         <div class="column full-column visible-xs-block">
  78.                             <ul>
  79.                                 {% for type in pays.children %}
  80.                                 {% if type.children is not null %}
  81.                                     <li>
  82.                                         <a class="sub-menu-btn" data-menu="{{ type.name|slugify }}" data-level="2" href="#">
  83.                                             {{  type.name }}
  84.                                             <span class="iconDir glyphicon glyphicon-menu-right visible-xs-block"></span>
  85.                                         </a>
  86.                                         <div id="menu-{{ type.name|slugify }}-mobile" class="sub-menu sub-menu-2 nested-menu-mobile">
  87.                                         {% for gregion in type.children %}
  88.                                             {% if gregion.children is not null %}
  89.                                                     {% for region in gregion.children %}
  90.                                                         {% if region.children is not null %}
  91.                                                             <a href="{{ path('ac_platform_destination_slug', {'slug': region.canonical }) }}" class="link">{{ region.name }}</a>
  92.                                                         {% endif %}
  93.                                                     {% endfor %}
  94.                                             {% endif %}
  95.                                         {% endfor %}
  96.                                         </div>
  97.                                     </li>
  98.                                 {% endif %}
  99.                                 {% endfor %}
  100.                                 {# lien By Ateya #}
  101.                                 <li>
  102.                                     <a class="sub-menu-btn" data-menu="byateya" data-level="2" href="#">
  103.                                         <em>by ATEYA</em>
  104.                                         <span class="iconDir glyphicon glyphicon-menu-right visible-xs-block"></span>
  105.                                     </a>
  106.                                     <div id="menu-byateya-mobile" class="sub-menu sub-menu-2 nested-menu-mobile">
  107.                                         {{ byAteyaResidences | raw }}
  108.                                     </div>
  109.                                 </li>
  110.                             </ul>
  111.                         </div>
  112.                         <div class="column center-column hidden-xs"></div>
  113.                         <div class="column right-column hidden-xs">
  114.                             {{ nestedMenu | raw }}
  115.                         </div>
  116.                     </div>
  117.                 </li>
  118.             </ul>
  119.         {% endfor %}
  120.     {% endif %}
  121. {% endif %}