templates/DistrictList/list.html.twig line 1

Open in your IDE?
  1. {% extends 'grid.html.twig' %}
  2. {% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
  3. {% block mainContainer %}
  4.     {{ knp_menu_render('breadcrumbs', {'template': '__design/v2023/_menu/breadcrumbs.html.twig'}) }}
  5.     <div class="heading d-flex">
  6.         <h1 class="heading-title text-title mr-1" role="heading">{{ seo_heading() ? seo_heading() : 'Поиск по районам' }}</h1>
  7.     </div>
  8.     <div class="catalog-district-container white-block mb-4">
  9.         {% set currentCounty = null %}
  10.         {% set sorted_stations = city.counties|sort((a, b) => a.name|upper <=> b.name|upper) %}
  11.         {% for county in sorted_stations %}
  12.             {% set profilesCountInCounty = count_by_counties[county.id] ?? 0 %}
  13.             {% set newCounty = county.name %}
  14.             {% if newCounty != currentCounty %}
  15.                 {% if loop.index != 1 %}</div>{% endif %}
  16.                 {% set currentCounty = newCounty %}
  17.                 <div class="catalog catalog-district mb-4">
  18.                     <a class="catalog-title mb-2 fw-700 d-flex-c" href="{{ path('profile_list.list_by_county', {'city': city.uriIdentity, 'county': county.uriIdentity}) }}">
  19.                         {{ county.name|trans }} <span class="metro-count counties-count d-flex-c clr-main-text fw-600">{{ profilesCountInCounty }}</span>
  20.                     </a>
  21.             {% endif %}
  22.             {% for district in county.districts|sort((a, b) => a.name|trans|upper <=> b.name|trans|upper) %}
  23.                 {% set profilesCount = count_by_districts[district.id] ?? 0 %}
  24.                 <div class="catalog-item">
  25.                     <a class="metro-link d-flex-c" href="{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}">
  26.                         <span class="metro-name mr-1">{{ district.name|trans }}</span>
  27.                         <span class="metro-count d-flex-c clr-main-text fw-600">{{ profilesCount }}</span>
  28.                     </a>
  29.                 </div>
  30.             {% endfor %}
  31.             {# <div class="catalog-item">
  32.                 <a class="metro-link d-flex-c" href="{{ path('profile_list.list_by_station', {'city': city.uriIdentity, 'station': station.uriIdentity}) }}">
  33.                     {% include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} %}
  34.                     <span class="metro-name mr-1">{{ station.name|trans }}</span>
  35.                     <span class="metro-count d-flex-c clr-main-text fw-600">10</span>
  36.                 </a>
  37.             </div> #}
  38.         {% endfor %}
  39.     </div>
  40.     {# <div class="new-questionare">
  41.         {{ include('components/last_girl_list.html.twig') }}
  42.     </div>
  43.     {{ include('components/seo_text.html.twig', { 'type': 'bottom', "noindex": false }) }} #}
  44. {% endblock %}