templates/geo/parts/tour.html.twig line 1

Open in your IDE?
  1. <div class="tour-list__container list__container">
  2.     <div class="tour-list__view swiper-container tour-slider">
  3.         <div class="tour-list__list swiper-wrapper">
  4.             {% set mnths = ['', 'januaryRd'|trans, 'februaryRd'|trans, 'marchRd'|trans, 'aprilRd'|trans, 'mayRd'|trans, 'juneRd'|trans, 'julyRd'|trans, 'augustRd'|trans, 'septemberRd'|trans, 'octoberRd'|trans, 'novemberRd'|trans, 'decemberRd'|trans] %}
  5.             {% for tour in items %}
  6.                 {% if statusHot is defined %}
  7.                     {% set tourTitle = 'Горящий тур'|trans %}
  8.                 {% else %}
  9.                     {% set tourTitle = 'Тур'|trans %}
  10.                 {% endif %}
  11.                 {% set tourTitle = tourTitle ~ ' в ' ~ tour.name ~ ' ' ~ tour.stars ~ '☆ ' ~ tour.countryName ~ ', ' ~ tour.cityName %}
  12.                 <a class="tour-list__item swiper-slide" href="/hotel/{{ tour.id }}-{{ tour.hrefName }}/{{ tour.offerId }}/?type={{ type ?? 'not-determined' }}&block={{ block ?? 'not-determined' }}" title="{{ tourTitle }}">
  13.                     <span class="tour-list__item-photo" style="background-image: url('{{ tour.desktop_gallery }}');">
  14.                         {% if not (tour.rating == '0.00' and tour.ratingBySite|length == 0) %}
  15.                         <span class="tour-list__rating-list" >
  16.                             {% if tour.ratingBySite|length > 0 %}
  17.                                 <span class="rating-list__container">
  18.                                     <span class="rating-list__bar-wrapper" data-rat-value="{{ tour.rating|round(2, 'common')|number_format(1, '.') }}">
  19.                                         <span class="rating-list__progressbar">
  20.                                             <span class="rating-list__bar" data-value="{{ tour.rating }}"></span>
  21.                                         </span>
  22.                                         {{ tour.rating|round(2, 'common')|number_format(1, '.') }}
  23.                                     </span>
  24.                                     <span class="rating-list__popup">
  25.                                         <span class="rating-list__popup-list">
  26.                                             {% set sum = 0 %}
  27.                                             {% for rating in tour.ratingBySite %}
  28.                                                 <span class="rating-list__popup-item">
  29.                                                 <span class="rating-list__popup-item-logo rating-list__popup-item-logo-{{ rating.name }}"></span>
  30.                                                 <span class="rating-list__popup-item-rating-container">
  31.                                                     <span class="rating-list__bar-wrapper small">
  32.                                                         <span class="rating-list__progressbar">
  33.                                                             <span class="rating-list__bar" data-value="{{ rating.rating }}"></span>
  34.                                                         </span>
  35.                                                         {{ rating.rating|round(2, 'common')|number_format(1, '.') }}
  36.                                                     </span>
  37.                                                     <span class="rating-list__popup-item-grades">{{ rating.reviews }} {{ 'оценок'|trans }}</span>
  38.                                                 </span>
  39.                                             </span>
  40.                                                 {% set sum = sum + rating.reviews %}
  41.                                             {% endfor %}
  42.                                         </span>
  43.                                         <span class="rating-list__popup-footer">
  44.                                             <span>{{ 'Средний балл'|trans }}</span>
  45.                                             <span class="rating-list__popup-item-rating-container" data-rat-val="{{ tour.rating|round(2, 'common')|number_format(1, '.') }}">
  46.                                                 <span class="rating-list__bar-wrapper">
  47.                                                     <span class="rating-list__progressbar">
  48.                                                         <span class="rating-list__bar" data-value="{{ tour.rating }}"></span>
  49.                                                     </span>
  50.                                                     {{ tour.rating|round(2, 'common')|number_format(1, '.') }}
  51.                                                 </span>
  52.                                                 <span class="rating-list__popup-item-grades">
  53.                                                     <span class="rating-list__popup-item-grades-text" style="display: none">Недостаточно оценок для расчета</span>
  54.                                                     <span class="rating-list__popup-item-grades-val">{{ sum }} {{ 'оценок'|trans }}</span>
  55.                                                 </span>
  56.                                             </span>
  57.                                         </span>
  58.                                     </span>
  59.                                 </span>
  60.                             {% endif %}
  61.                         </span>
  62.                         {% endif %}
  63.                     </span>
  64.                     <noscript>
  65.                         <img width="100%" src="{{ tour.desktop_gallery }}" alt="{{ tourTitle }}" >
  66.                     </noscript>
  67.                     <span class="tour-list__item-info">
  68.                         <span class="tour-list__item-hotel-name">
  69.                             <span class="tour-list__hotel-stars">{{ tour.stars }} <i class="icon icon-star"></i></span>
  70.                             <span class="tour-list__hotel-name" title="{{ tour.name }}">
  71.                                 <span>{{ tour.name }}</span>
  72.                             </span>
  73.                         </span>
  74.                         <span class="tour-list__item-location" title="{{ tour.countryName }}, {{ tour.cityName }}"><i class="icon icon-16px i16-location-4"></i>{{ tour.countryName }}, {{ tour.cityName }}</span>
  75.                         <span class="tour-list__item-decoration"></span>
  76.                         <span class="tour-list__item-duration"><i class="icon icon-16px i16-charact-7"></i>
  77.                             {% if tour.length-1 is not null %}{{ tour.length-1 }}{% if tour.length-1 in [1,21] %} {{ 'ночь'|trans}}{% elseif tour.length-1 in [2,3,4,22,23,24] %} {{ 'ночи'|trans}}{% else %} {{ 'ночей'|trans}}{% endif %}{% endif %},
  78.                             {{ tour.date|date("j") }} {{ mnths[tour.date|date("n")] }}</span>
  79.                         <span class="tour-list__item-food"><i class="icon icon-16px i16-charact-1"></i>{{ tour.food|trans }}</span>
  80.                         <span class="tour-list__item-duration-food">{{ tour.date|date("j") }} {{ mnths[tour.date|date("n")] }} <i></i>
  81.                             {% if tour.length-1 is not null %}{{ tour.length-1 }}{% if tour.length-1 in [1,21] %} {{ 'ночь'|trans}}{% elseif tour.length-1 in [2,3,4,22,23,24] %} {{ 'ночи'|trans}}{% else %} {{ 'ночей'|trans}}{% endif %}{% endif %}
  82.                             <i></i> {{ tour.food|trans }}</span>
  83.                         <span class="tour-list__item-total-sum"><span class="item-sum">{{ tour.marketPrice|round|number_format(0, '', ' ') }} {{ market.currency.name }}</span> {{ 'за 2-х'|trans }}{% if tour.transport == 'air' %} {{ 'с'|trans }} {{ 'перелётом'|trans }}{% elseif tour.transport == 'bus' %} {{ 'на'|trans }} {{ 'автобусе'|trans }}{% endif %}{% if route in ['app_country_search', 'app_city_search', 'app_city_search_departure_city', 'app_country_search_departure_city', 'app_country_search_season', 'app_city_search_season'] and tour.fromCityRd is not null %} {{ 'из'|trans }} {{ tour.fromCityRd }}{% endif %}</span>
  84.                         <span class="tour-list__item-buy-tour">{{ 'Где купить тур?'|trans }}</span>
  85.                     </span>
  86.                 </a>
  87.             {% endfor %}
  88.         </div>
  89.     </div>
  90.     <div class="swiper-button swiper-button-prev"></div>
  91.     <div class="swiper-button swiper-button-next"></div>
  92.     <div class="spoiler__container">
  93.         <div class="spoiler__button not-toggable show-more-tours-button">
  94.             <span>
  95.                 <i class="icon icon-darr-blue"></i>
  96.                 {{ 'Больше'|trans }}
  97.             </span>
  98.         </div>
  99.     </div>
  100. </div>