<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* DistrictList/list.html.twig */
class __TwigTemplate_fcce3a5daf672543daddd497c6f8447f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'mainContainer' => [$this, 'block_mainContainer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "grid.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "DistrictList/list.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "DistrictList/list.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "DistrictList/list.html.twig"));
// line 3
$context["linkLangSupport"] = (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "locale", [], "any", false, false, false, 3) == "en")) ? ("/en") : (""));
// line 1
$this->parent = $this->loadTemplate("grid.html.twig", "DistrictList/list.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
public function block_mainContainer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
// line 6
echo "\t";
echo $this->extensions['Knp\Menu\Twig\MenuExtension']->render("breadcrumbs", ["template" => "__design/v2023/_menu/breadcrumbs.html.twig"]);
echo "
\t<div class=\"heading d-flex\">
\t\t<h1 class=\"heading-title text-title mr-1\" role=\"heading\">";
// line 9
echo (($this->extensions['App\Twig\SeoExtension']->pageHeading()) ? ($this->extensions['App\Twig\SeoExtension']->pageHeading()) : ("Поиск по районам"));
echo "</h1>
\t</div>
\t<div class=\"catalog-district-container white-block mb-4\">
\t\t";
// line 13
$context["currentCounty"] = null;
// line 14
echo "\t\t";
$context["sorted_stations"] = twig_sort_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["city"]) || array_key_exists("city", $context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.', 14, $this->source); })()), "counties", [], "any", false, false, false, 14), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 14, $this->source); })()), "name", [], "any", false, false, false, 14)) <=> twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 14, $this->source); })()), "name", [], "any", false, false, false, 14))); });
// line 15
echo "\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["sorted_stations"]) || array_key_exists("sorted_stations", $context) ? $context["sorted_stations"] : (function () { throw new RuntimeError('Variable "sorted_stations" does not exist.', 15, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["county"]) {
// line 16
echo " ";
$context["profilesCountInCounty"] = (((twig_get_attribute($this->env, $this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env, $this->source, $context["county"], "id", [], "any", false, false, false, 16), [], "array", true, true, false, 16) && !(null === twig_get_attribute($this->env, $this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env, $this->source, $context["county"], "id", [], "any", false, false, false, 16), [], "array", false, false, false, 16)))) ? (twig_get_attribute($this->env, $this->source, ($context["count_by_counties"] ?? null), twig_get_attribute($this->env, $this->source, $context["county"], "id", [], "any", false, false, false, 16), [], "array", false, false, false, 16)) : (0));
// line 17
echo "
\t\t\t";
// line 18
$context["newCounty"] = twig_get_attribute($this->env, $this->source, $context["county"], "name", [], "any", false, false, false, 18);
// line 19
echo "\t\t\t";
if (((isset($context["newCounty"]) || array_key_exists("newCounty", $context) ? $context["newCounty"] : (function () { throw new RuntimeError('Variable "newCounty" does not exist.', 19, $this->source); })()) != (isset($context["currentCounty"]) || array_key_exists("currentCounty", $context) ? $context["currentCounty"] : (function () { throw new RuntimeError('Variable "currentCounty" does not exist.', 19, $this->source); })()))) {
// line 20
echo "\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 20) != 1)) {
echo "</div>";
}
// line 21
echo "\t\t\t\t";
$context["currentCounty"] = (isset($context["newCounty"]) || array_key_exists("newCounty", $context) ? $context["newCounty"] : (function () { throw new RuntimeError('Variable "newCounty" does not exist.', 21, $this->source); })());
// line 22
echo "\t\t\t\t<div class=\"catalog catalog-district mb-4\">
\t\t\t\t\t<a class=\"catalog-title mb-2 fw-700 d-flex-c\" href=\"";
// line 23
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_list.list_by_county", ["city" => twig_get_attribute($this->env, $this->source, (isset($context["city"]) || array_key_exists("city", $context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.', 23, $this->source); })()), "uriIdentity", [], "any", false, false, false, 23), "county" => twig_get_attribute($this->env, $this->source, $context["county"], "uriIdentity", [], "any", false, false, false, 23)]), "html", null, true);
echo "\">
\t\t\t\t\t\t";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["county"], "name", [], "any", false, false, false, 24)), "html", null, true);
echo " <span class=\"metro-count counties-count d-flex-c clr-main-text fw-600\">";
echo twig_escape_filter($this->env, (isset($context["profilesCountInCounty"]) || array_key_exists("profilesCountInCounty", $context) ? $context["profilesCountInCounty"] : (function () { throw new RuntimeError('Variable "profilesCountInCounty" does not exist.', 24, $this->source); })()), "html", null, true);
echo "</span>
\t\t\t\t\t</a>
\t\t\t";
}
// line 27
echo "
\t\t\t";
// line 28
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, twig_get_attribute($this->env, $this->source, $context["county"], "districts", [], "any", false, false, false, 28), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_upper_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 28, $this->source); })()), "name", [], "any", false, false, false, 28))) <=> twig_upper_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 28, $this->source); })()), "name", [], "any", false, false, false, 28)))); }));
foreach ($context['_seq'] as $context["_key"] => $context["district"]) {
// line 29
echo "\t\t\t\t";
$context["profilesCount"] = (((twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 29), [], "array", true, true, false, 29) && !(null === twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 29), [], "array", false, false, false, 29)))) ? (twig_get_attribute($this->env, $this->source, ($context["count_by_districts"] ?? null), twig_get_attribute($this->env, $this->source, $context["district"], "id", [], "any", false, false, false, 29), [], "array", false, false, false, 29)) : (0));
// line 30
echo "
\t\t\t\t<div class=\"catalog-item\">
\t\t\t\t\t<a class=\"metro-link d-flex-c\" href=\"";
// line 32
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_list.list_by_district", ["city" => twig_get_attribute($this->env, $this->source, (isset($context["city"]) || array_key_exists("city", $context) ? $context["city"] : (function () { throw new RuntimeError('Variable "city" does not exist.', 32, $this->source); })()), "uriIdentity", [], "any", false, false, false, 32), "district" => twig_get_attribute($this->env, $this->source, $context["district"], "uriIdentity", [], "any", false, false, false, 32)]), "html", null, true);
echo "\">
\t\t\t\t\t\t<span class=\"metro-name mr-1\">";
// line 33
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["district"], "name", [], "any", false, false, false, 33)), "html", null, true);
echo "</span>
\t\t\t\t\t\t<span class=\"metro-count d-flex-c clr-main-text fw-600\">";
// line 34
echo twig_escape_filter($this->env, (isset($context["profilesCount"]) || array_key_exists("profilesCount", $context) ? $context["profilesCount"] : (function () { throw new RuntimeError('Variable "profilesCount" does not exist.', 34, $this->source); })()), "html", null, true);
echo "</span>
\t\t\t\t\t</a>
\t\t\t\t</div>
\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['district'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo "
\t\t\t";
// line 46
echo "\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['county'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
echo "\t</div>
\t";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "DistrictList/list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 200 => 47, 186 => 46, 183 => 38, 173 => 34, 169 => 33, 165 => 32, 161 => 30, 158 => 29, 154 => 28, 151 => 27, 143 => 24, 139 => 23, 136 => 22, 133 => 21, 128 => 20, 125 => 19, 123 => 18, 120 => 17, 117 => 16, 99 => 15, 96 => 14, 94 => 13, 87 => 9, 80 => 6, 67 => 5, 53 => 1, 51 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'grid.html.twig' %}
{% set linkLangSupport = app.request.locale == 'en' ? '/en' : '' %}
{% block mainContainer %}
\t{{ knp_menu_render('breadcrumbs', {'template': '__design/v2023/_menu/breadcrumbs.html.twig'}) }}
\t<div class=\"heading d-flex\">
\t\t<h1 class=\"heading-title text-title mr-1\" role=\"heading\">{{ seo_heading() ? seo_heading() : 'Поиск по районам' }}</h1>
\t</div>
\t<div class=\"catalog-district-container white-block mb-4\">
\t\t{% set currentCounty = null %}
\t\t{% set sorted_stations = city.counties|sort((a, b) => a.name|upper <=> b.name|upper) %}
\t\t{% for county in sorted_stations %}
{% set profilesCountInCounty = count_by_counties[county.id] ?? 0 %}
\t\t\t{% set newCounty = county.name %}
\t\t\t{% if newCounty != currentCounty %}
\t\t\t\t{% if loop.index != 1 %}</div>{% endif %}
\t\t\t\t{% set currentCounty = newCounty %}
\t\t\t\t<div class=\"catalog catalog-district mb-4\">
\t\t\t\t\t<a class=\"catalog-title mb-2 fw-700 d-flex-c\" href=\"{{ path('profile_list.list_by_county', {'city': city.uriIdentity, 'county': county.uriIdentity}) }}\">
\t\t\t\t\t\t{{ county.name|trans }} <span class=\"metro-count counties-count d-flex-c clr-main-text fw-600\">{{ profilesCountInCounty }}</span>
\t\t\t\t\t</a>
\t\t\t{% endif %}
\t\t\t{% for district in county.districts|sort((a, b) => a.name|trans|upper <=> b.name|trans|upper) %}
\t\t\t\t{% set profilesCount = count_by_districts[district.id] ?? 0 %}
\t\t\t\t<div class=\"catalog-item\">
\t\t\t\t\t<a class=\"metro-link d-flex-c\" href=\"{{ path('profile_list.list_by_district', {'city': city.uriIdentity, 'district': district.uriIdentity}) }}\">
\t\t\t\t\t\t<span class=\"metro-name mr-1\">{{ district.name|trans }}</span>
\t\t\t\t\t\t<span class=\"metro-count d-flex-c clr-main-text fw-600\">{{ profilesCount }}</span>
\t\t\t\t\t</a>
\t\t\t\t</div>
\t\t\t{% endfor %}
\t\t\t{# <div class=\"catalog-item\">
\t\t\t\t<a class=\"metro-link d-flex-c\" href=\"{{ path('profile_list.list_by_station', {'city': city.uriIdentity, 'station': station.uriIdentity}) }}\">
\t\t\t\t\t{% include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} %}
\t\t\t\t\t<span class=\"metro-name mr-1\">{{ station.name|trans }}</span>
\t\t\t\t\t<span class=\"metro-count d-flex-c clr-main-text fw-600\">10</span>
\t\t\t\t</a>
\t\t\t</div> #}
\t\t{% endfor %}
\t</div>
\t{# <div class=\"new-questionare\">
\t\t{{ include('components/last_girl_list.html.twig') }}
\t</div>
\t{{ include('components/seo_text.html.twig', { 'type': 'bottom', \"noindex\": false }) }} #}
{% endblock %}", "DistrictList/list.html.twig", "/app/templates/DistrictList/list.html.twig");
}
}