templates/menu/submenu_top.html.twig line 1

Open in your IDE?
  1. {% set currentTab = '' %}
  2. {% set currentCount = 0 %}
  3. {% set lastLocation = '' %}
  4. {% for hotel_menu in hotels %}
  5.     {% if currentTab != hotel_menu.location.class and currentTab != '' %}
  6.         </div>
  7.     {% endif %}
  8.     {% if currentTab != hotel_menu.location.class %}
  9. <div class="submenu" id="submenu-{{ hotel_menu.location.class }}">
  10.     <div class="submenu--return js-submenu-close">
  11.         {% include 'partials/global/svg/icon-arrow-artiem.svg.twig' %}
  12.         <span>{{ 'app.global.return'|trans }}</span>
  13.     </div>
  14.     <div class="submenu--close js-menu-close">
  15.         {% include 'partials/global/svg/close.svg.twig' %}
  16.     </div>
  17.     <a class="submenu--title" href="{{ url(hotel_menu.location) }}">{{ hotel_menu.location.class }}</a>
  18.     <a class="submenu--subtitle" href="{{ url(hotel_menu.location) }}">{{ 'app.global.view_destiny'|trans }}</a>
  19.     {% set currentTab = hotel_menu.location.class %}
  20.     {% set currentCount = 0 %}
  21.     {% endif %}
  22.     {% if hotel_menu.enabled %}
  23.         {% if lastLocation != currentTab %}
  24.         <div class="submenu--group-wrapper">
  25.         {% endif %}
  26.             <div class="submenu--group">
  27.                 <div class="submenu--col {{ currentCount == 0 ? 'is-active' : ''}}">
  28.                     <a class="submenu--item js-go-page" href="{{ path(hotel_menu, {'type': 'hotel'}) }}"><span>ARTIEM </span>{{ hotel_menu.simpleName }}</a>
  29.                     <button
  30.                         class="submenu--arrow js-dropdown {{ currentCount == 0 ? 'is-active' : ''}}">{% include 'partials/global/svg/icon-arrow-artiem.svg.twig' %}</button>
  31.                     <ul class="submenu--dropdown">
  32.                         {% if hotel_menu.id != 6 %}
  33.                             <li class="submenu--subitem">
  34.                                 <a href="{{ path(hotel_menu, {'type': 'room'}) }}">{{ 'app.global.rooms' | trans }}</a>
  35.                             </li>
  36.                         {% endif %}
  37.                         {% if hotel_menu.id == 6 %}
  38.                             <li class="submenu--subitem">
  39.                                 <a href="{{ path(hotel_menu, {'type': 'room'}) }}">{{ 'app.global.apartments' | trans }}</a>
  40.                             </li>
  41.                         {% endif %}
  42.                         {% for experience_menu in hotel_menu.experiences %}
  43.                             <li class="submenu--subitem">
  44.                                 <a class="js-go-page" href="{{ url(experience_menu) }}">{{ experience_menu.menuTitle }}</a>
  45.                             </li>
  46.                         {% endfor %}
  47.                     </ul>
  48.                 </div>
  49.                 <a class="submenu--col" href="{{ path(hotel_menu, {'type': 'hotel'}) }}" style="background-image: url({{ hotel_menu.mainImage|resize(500)|file_url }});"></a>
  50.             </div>
  51.         {% set lastLocation = currentTab %}
  52.         {% if hotels[loop.index] is defined and hotels[loop.index].location.class != lastLocation %}
  53.         </div>
  54.         {% elseif loop.last %}
  55.         </div>
  56.         {% endif %}
  57.     {% set currentCount = currentCount + 1 %}
  58.     {% endif %}
  59.     {% endfor %}
  60. </div>