templates/geo/parts/resort-list.html.twig line 1

Open in your IDE?
  1. {% if cities|length > 0 %}
  2.     <div class="container__header">
  3.         <h2 class="container__header-title">
  4.             {% if route == 'app_countries' %}
  5.                 {{ 'Популярные курорты'|trans }}
  6.             {% elseif route == 'app_city_search' %}
  7.                 {{ 'Похожие курорты'|trans }}
  8.             {% endif %}
  9.         </h2>
  10.     </div>
  11.     <div class="resort-list__slider-wrapper">
  12.         <div class="resort-list__slider swiper-container">
  13.             <div class="resort-list__container swiper-wrapper">
  14.                 {% for city in cities %}
  15.                     <a class="resort-list__item swiper-slide" href="{{ path('app_city_search', { country: city.countryNameTr, city: city.nameTr }) }}" title="{{ city.name }}">
  16.                 <span class="resort-list__item-photo"
  17.                       style="background-image: url('{{ city.desktop_gallery }}');">
  18.                     <span class="resort-list__item-photo-row">
  19.                         <span class="resort-list__item-photo-name">{{ city.name }}</span>
  20.                         <span class="resort-list__item-photo-details">
  21.                             {% if city.weather is defined and city.weather is not null %}
  22.                                 <i class="icon icon-16px i16-other-5"></i>
  23.                                 <span>
  24.                                     {% if '-' in city.weather or city.weather is same as('0') %}{% else %}+{% endif %}{{ city.weather }}°
  25.                                 </span>
  26.                             {% endif %}
  27.                             {% if city.water is defined and city.water is not null %}
  28.                                 <i class="icon icon-16px i16-other-6"></i>
  29.                                 <span>
  30.                                     {% if '-' in city.water or city.water is same as('0') %}{% else %}+{% endif %}{{ city.water }}°
  31.                                 </span>
  32.                             {% endif %}
  33.                         </span>
  34.                     </span>
  35.                 </span>
  36.                         <span class="resort-list__item-info">
  37.                     <p>{{ city.text }}</p>
  38.                     {% if route in ['app_countries', 'app_city_search'] %}
  39.                         {% if city.price is defined and city.price is not null %}
  40.                             <span class="resort-list__item-price">
  41.                                 {{ 'Туры от'|trans }} <span>{{ city.price|round|number_format(0, '', ' ') }} {{ market.currency.name }}</span>
  42.                             </span>
  43.                         {% endif %}
  44.                     {% endif %}
  45.                 </span>
  46.                     </a>
  47.                 {% endfor %}
  48.             </div>
  49.         </div>
  50.         <div class="swiper-button swiper-button-prev"></div>
  51.         <div class="swiper-button swiper-button-next"></div>
  52.     </div>
  53. {% endif %}