templates/geo/parts/card-with-icon.html.twig line 1

Open in your IDE?
  1. {% set statusVisibleSport = false %}
  2. {% for name, sport in sports %}
  3.     {% if attribute(dictionarySports, name) is defined and sport == 1 %}
  4.         {% set statusVisibleSport = true %}
  5.     {% endif %}
  6. {% endfor %}
  7. {% if statusVisibleSport %}
  8.     <div class="container">
  9.         <div class="container__header">
  10.             <h3 class="container__header-title">
  11.                 {{ 'Развлечения и спорт'|trans }}
  12.             </h3>
  13.         </div>
  14.         <div class="card-with-icon__list">
  15.             {% for name, sport in sports %}
  16.                 {% if attribute(dictionarySports, name) is defined and sport == 1 %}
  17.                     {% if route in ['app_country_search_departure_city', 'app_city_search_departure_city'] %}
  18.                         {% set departureCityForLink = departureCity.id %}
  19.                     {% else %}
  20.                         {% set departureCityForLink = 1544 %}
  21.                     {% endif %}
  22.                     <a class="card-with-icon__item" href="{{ searchUrlGenerator.generate(page.info.id, name, departureCityForLink) }}" title="{{ name|trans }} в {{ page.info.namePr }}">
  23.                         <i class="icon icon-32px i{{ attribute(dictionarySports, name).iconCode }}"></i>
  24.                         <span class="card-with-icon__item-name">{{ attribute(page.hotelServices, name)|capitalize }}</span>
  25.                     </a>
  26.                 {% endif %}
  27.             {% endfor %}
  28.         </div>
  29.         <div class="spoiler__container">
  30.             <div class="spoiler__button not-toggable show-more-cards-button">
  31.                 <span>
  32.                     <i class="icon icon-darr-blue"></i>
  33.                     {{ 'Больше'|trans }}
  34.                 </span>
  35.             </div>
  36.         </div>
  37.     </div>
  38. {% endif %}