<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* city/list.html.twig */
class __TwigTemplate_8ad34992ba5693d102c2eb174b0a0df9921761b3caff526c7e622538756c8f07 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 7
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "city/list.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "city/list.html.twig"));
// line 1
$context["body_classes"] = ["list-of-cities"];
// line 2
$context["suffix"] = (((0 === CoreExtension::compare((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 2, $this->source); })()), 1))) ? ("") : ("_with_page"));
// line 3
$context["title"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("city_list" . (isset($context["suffix"]) || array_key_exists("suffix", $context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.', 3, $this->source); })())) . ".title"), ["%page%" => (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 3, $this->source); })())]);
// line 4
$context["description"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("city_list" . (isset($context["suffix"]) || array_key_exists("suffix", $context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.', 4, $this->source); })())) . ".description"), ["%page%" => (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 4, $this->source); })())]);
// line 5
$context["keywords"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("city_list" . (isset($context["suffix"]) || array_key_exists("suffix", $context) ? $context["suffix"] : (function () { throw new RuntimeError('Variable "suffix" does not exist.', 5, $this->source); })())) . ".keywords"), ["%page%" => (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 5, $this->source); })())]);
// line 7
$this->parent = $this->loadTemplate("base.html.twig", "city/list.html.twig", 7);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 9
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 10
yield " ";
yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
yield "
";
// line 11
yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("city_list");
yield "
";
// line 12
yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("search_autocomplete");
yield "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 15
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 16
yield " <main>
<div class=\"container\">
<div class=\"list-of-cities-container\">
<div class=\"search-form-wrapper animate-on-scroll-bottom\">
<div class=\"title\">
<h3>";
// line 21
yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cities.list_title");
yield "</h3>
</div>
";
// line 23
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 23, $this->source); })()), 'form_start', ["attr" => ["data-controller" => "search", "data-search-url-value" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("search_cities_with_profiles"), "data-action" => "submit->search#onSubmit"]]);
// line 27
yield "
<div class=\"field-wrapper\">
";
// line 29
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 29, $this->source); })()), "search", [], "any", false, false, false, 29), 'widget', ["attr" => ["data-action" => "input->search#onAutocomplete click->search#onClick", "data-search-target" => "input"]]);
// line 32
yield "
<div class=\"autocomplete-results\" ";
// line 33
yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\StimulusTwigExtension']->renderStimulusTarget($this->env, "search", "results");
yield "></div>
</div>
<div class=\"buttons-container\">
";
// line 36
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 36, $this->source); })()), "submit", [], "any", false, false, false, 36), 'widget');
yield "
</div>
";
// line 38
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 38, $this->source); })()), 'form_end');
yield "
</div>
<div class=\"list-wrapper\">
";
// line 41
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["cities"]) || array_key_exists("cities", $context) ? $context["cities"] : (function () { throw new RuntimeError('Variable "cities" does not exist.', 41, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["city"]) {
// line 42
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_companies_list", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["city"], "id", [], "any", false, false, false, 42), "slug" => CoreExtension::getAttribute($this->env, $this->source, $context["city"], "slug", [], "any", false, false, false, 42)]), "html", null, true);
yield "\" class=\"city\">
";
// line 43
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["city"], "name", [], "any", false, false, false, 43), "html", null, true);
yield "
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['city'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
yield " </div>
";
// line 47
if ((1 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 47, $this->source); })())), 1))) {
// line 48
yield " <div class=\"toolbar-bottom-container\">
<nav class=\"pagination-container\">
";
// line 50
if ((1 === CoreExtension::compare((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 50, $this->source); })()), 1))) {
// line 51
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_list", ["page" => ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 51, $this->source); })()) - 1)]), "html", null, true);
yield "\" class=\"p-i-previous\"></a>
";
} else {
// line 53
yield " <span class=\"p-i-previous p-i-disabled\"></span>
";
}
// line 55
yield " <span class=\"pagination-pages\">
";
// line 56
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 56, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 57
yield " ";
if ((0 === CoreExtension::compare($context["p"], (isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 57, $this->source); })())))) {
// line 58
yield " <span class=\"pagination-item p-i p-i-disabled\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
yield "</span>
";
} elseif ((0 === CoreExtension::compare( // line 59
$context["p"], "..."))) {
// line 60
yield " <span class=\"pagination-item p-i\">…</span>
";
} else {
// line 62
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_list", ["page" => $context["p"]]), "html", null, true);
yield "\" class=\"pagination-item p-i\">
";
// line 63
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["p"], "html", null, true);
yield "
</a>
";
}
// line 66
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 67
yield " </span>
";
// line 68
if ((-1 === CoreExtension::compare((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 68, $this->source); })()), Twig\Extension\CoreExtension::last($this->env->getCharset(), (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 68, $this->source); })()))))) {
// line 69
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_list", ["page" => ((isset($context["currentPage"]) || array_key_exists("currentPage", $context) ? $context["currentPage"] : (function () { throw new RuntimeError('Variable "currentPage" does not exist.', 69, $this->source); })()) + 1)]), "html", null, true);
yield "\" class=\"p-i-next\"></a>
";
} else {
// line 71
yield " <span class=\"p-i-next p-i-disabled\"></span>
";
}
// line 73
yield " </nav>
</div>
";
}
// line 76
yield " </div>
</div>
</main>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "city/list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 250 => 76, 245 => 73, 241 => 71, 235 => 69, 233 => 68, 230 => 67, 224 => 66, 218 => 63, 213 => 62, 209 => 60, 207 => 59, 202 => 58, 199 => 57, 195 => 56, 192 => 55, 188 => 53, 182 => 51, 180 => 50, 176 => 48, 174 => 47, 171 => 46, 162 => 43, 157 => 42, 153 => 41, 147 => 38, 142 => 36, 136 => 33, 133 => 32, 131 => 29, 127 => 27, 125 => 23, 120 => 21, 113 => 16, 103 => 15, 90 => 12, 86 => 11, 81 => 10, 71 => 9, 60 => 7, 58 => 5, 56 => 4, 54 => 3, 52 => 2, 50 => 1, 37 => 7,);
}
public function getSourceContext()
{
return new Source("{% set body_classes = ['list-of-cities'] %}
{% set suffix = currentPage == 1 ? '' : '_with_page' %}
{% set title = ('city_list' ~ suffix ~ '.title')|trans({'%page%': currentPage}) %}
{% set description = ('city_list' ~ suffix ~ '.description')|trans({'%page%': currentPage}) %}
{% set keywords = ('city_list' ~ suffix ~ '.keywords')|trans({'%page%': currentPage}) %}
{% extends 'base.html.twig' %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('city_list') }}
{{ encore_entry_link_tags('search_autocomplete') }}
{% endblock stylesheets %}
{% block content %}
<main>
<div class=\"container\">
<div class=\"list-of-cities-container\">
<div class=\"search-form-wrapper animate-on-scroll-bottom\">
<div class=\"title\">
<h3>{{ 'cities.list_title'|trans|raw }}</h3>
</div>
{{ form_start(form, {'attr': {
'data-controller': 'search',
'data-search-url-value': path('search_cities_with_profiles'),
'data-action': 'submit->search#onSubmit',
}}) }}
<div class=\"field-wrapper\">
{{ form_widget(form.search, {'attr': {
'data-action': 'input->search#onAutocomplete click->search#onClick',
'data-search-target': 'input',
}}) }}
<div class=\"autocomplete-results\" {{ stimulus_target('search', 'results') }}></div>
</div>
<div class=\"buttons-container\">
{{ form_widget(form.submit) }}
</div>
{{ form_end(form) }}
</div>
<div class=\"list-wrapper\">
{% for city in cities %}
<a href=\"{{ path('city_companies_list', {'id': city.id, 'slug': city.slug}) }}\" class=\"city\">
{{ city.name }}
</a>
{% endfor %}
</div>
{% if pagination|length > 1 %}
<div class=\"toolbar-bottom-container\">
<nav class=\"pagination-container\">
{% if currentPage > 1 %}
<a href=\"{{ path('city_list', { page: currentPage - 1 }) }}\" class=\"p-i-previous\"></a>
{% else %}
<span class=\"p-i-previous p-i-disabled\"></span>
{% endif %}
<span class=\"pagination-pages\">
{% for p in pagination %}
{% if p == currentPage %}
<span class=\"pagination-item p-i p-i-disabled\">{{ p }}</span>
{% elseif p == '...' %}
<span class=\"pagination-item p-i\">…</span>
{% else %}
<a href=\"{{ path('city_list', { page: p }) }}\" class=\"pagination-item p-i\">
{{ p }}
</a>
{% endif %}
{% endfor %}
</span>
{% if currentPage < pagination|last %}
<a href=\"{{ path('city_list', { page: currentPage + 1 }) }}\" class=\"p-i-next\"></a>
{% else %}
<span class=\"p-i-next p-i-disabled\"></span>
{% endif %}
</nav>
</div>
{% endif %}
</div>
</div>
</main>
{% endblock content %}", "city/list.html.twig", "/var/www/brc_frontend/templates/city/list.html.twig");
}
}