templates/geo/parts/from-city.html.twig line 1

Open in your IDE?
  1. {% if data %}
  2.     <div class="container">
  3.         <div class="container__header">
  4.             <h3 class="container__header-title">
  5.                 {{ 'Туры из других городов'|trans }}
  6.             </h3>
  7.         </div>
  8.         <div class="card-with-icon__list">
  9.             {% for departureCityItem in data %}
  10.                 {% if (departureCity is defined and departureCityItem.nameTr != departureCity.nameTr) or departureCity is not defined %}
  11.                     {% set departureCityUrl = false %}
  12.                     {% if departureCityItem.nameTr == 'kiev' %}
  13.                         {% if route in ['app_country_search_departure_city','app_country_search_season'] %}
  14.                             {% set departureCityUrl = path('app_country_search', {country: country}) %}
  15.                         {% elseif(route not in ['app_country_search','app_city_search']) %}
  16.                             {% set departureCityUrl = path('app_city_search', {country: country, city: city}) %}
  17.                         {% endif %}
  18.                     {% else %}
  19.                         {% if route in ['app_country_search','app_country_search_departure_city','app_country_search_season'] %}
  20.                             {% set departureCityUrl = path('app_country_search_departure_city', {country: country, departureCity: departureCityItem.nameTr}) %}
  21.                         {% else %}
  22.                             {% set departureCityUrl = path('app_city_search_departure_city', {country: country, city: city, departureCity: departureCityItem.nameTr}) %}
  23.                         {% endif %}
  24.                     {% endif %}
  25.                     {% if departureCityUrl %}
  26.                         <a class="card-with-icon__item"
  27.                            href="{{ departureCityUrl }}"
  28.                            title="{{ 'Туры'|trans }} {{ 'из'|trans }} {{ departureCityItem.name }}">
  29.                             <i class="icon icon-32px i32-categories-25"></i>
  30.                             <span class="card-with-icon__item-name">{{ 'Туры'|trans }} {{ 'из'|trans }} {{ departureCityItem.name }}</span>
  31.                         </a>
  32.                     {% endif %}
  33.                 {% endif %}
  34.             {% endfor %}
  35.         </div>
  36.     </div>
  37. {% endif %}