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.name }}" href="{{ path('ac_platform_destination', {'slug': type.name|slugify, 'id': type.id_iresa }) }}">
  37.                                             {{  type.name }}
  38.                                             
  39.                                         </a>
  40.                                         {% set nestedMenu = nestedMenu ~ '<div class="nested-menu" id="menu-' ~ type.name ~ '">' %}    
  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': region.name|slugify, 'id': region.id_iresa }) ~'" 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.                                     
  63.                                     {% 
  64.                                     set byAteyaResidences = '<a href="' ~ path('ac_platform_produit', {'slug': 'le-domaine-des-cazelles-by-ateya' , 'id': 111}) ~'" class="link">Le Domaine des Cazelles<br/><small>Cajarc / Cahors</small></a>
  65.                                     <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>
  66.                                     <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>
  67.                                     <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>
  68.                                     <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>' 
  69.                                     %}
  70.                                     {% set nestedMenu = nestedMenu ~ '<div class="nested-menu" id="menu-byateya">' ~ byAteyaResidences ~'</div>' %}    
  71.                                 </li>
  72.                             </ul>
  73.                         </div>
  74.                         <div class="column full-column visible-xs-block">
  75.                             <ul>
  76.                                 {% for type in pays.children %}
  77.                                 {% if type.children is not null %}
  78.                                     <li>
  79.                                         <a class="sub-menu-btn" data-menu="{{ type.name }}" data-level="2" href="#">
  80.                                             {{  type.name }}
  81.                                             <span class="iconDir glyphicon glyphicon-menu-right visible-xs-block"></span>
  82.                                         </a>
  83.                                         <div id="menu-{{ type.name }}-mobile" class="sub-menu sub-menu-2 nested-menu-mobile">
  84.                                         {% for gregion in type.children %}
  85.                                             {% if gregion.children is not null %}
  86.                                                     {% for region in gregion.children %}
  87.                                                         {% if region.children is not null %}
  88.                                                             <a href="{{ path('ac_platform_destination', {'slug': region.name|slugify, 'id': region.id_iresa }) }}" class="link">{{ region.name }}</a>
  89.                                                         {% endif %}
  90.                                                     {% endfor %}
  91.                                             {% endif %}
  92.                                         {% endfor %}
  93.                                         </div>
  94.                                     </li>
  95.                                 {% endif %}
  96.                                 {% endfor %}
  97.                                 {# lien By Ateya #}
  98.                                 <li>
  99.                                     <a class="sub-menu-btn" data-menu="byateya" data-level="2" href="#">
  100.                                         <em>by ATEYA</em>
  101.                                         <span class="iconDir glyphicon glyphicon-menu-right visible-xs-block"></span>
  102.                                     </a>
  103.                                     <div id="menu-byateya-mobile" class="sub-menu sub-menu-2 nested-menu-mobile">
  104.                                         {{ byAteyaResidences | raw }}
  105.                                     </div>
  106.                                 </li>
  107.                             </ul>
  108.                         </div>
  109.                         <div class="column center-column hidden-xs"></div>
  110.                         <div class="column right-column hidden-xs">
  111.                             {{ nestedMenu | raw }}
  112.                         </div>
  113.                     </div>
  114.                 </li>
  115.             </ul>
  116.         {% endfor %}
  117.     {% endif %}
  118. {% endif %}