<?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;
/* Slivki/city_selector.html.twig */
class __TwigTemplate_8d1d6a256e523818670d4e64d5233e4e72b51ea6dd6ce7c5221a3732f0d773c1 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "Slivki/city_selector.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/city_selector.html.twig"));
// line 1
echo "<div class=\"d-inline-block\">
<div class=\"city-selector-opener\">
<a href=\"javascript:void(0)\">";
// line 3
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["currentCity"]) || array_key_exists("currentCity", $context) ? $context["currentCity"] : (function () { throw new RuntimeError('Variable "currentCity" does not exist.', 3, $this->source); })()), "getName", [], "method", false, false, false, 3), "html", null, true);
echo "</a>
<div class=\"city-selector\">
<div style=\"width: 265px;\">
<div class=\"text-center text-nowrap border-bottom p-3\">Выберите местоположение</div>
<div class=\"border-bottom p-2 position-relative\">
<input id=\"citySearchInput\" type=\"text\" class=\"form-element\" placeholder=\"Поиск по названию\">
<button id=\"citySearchClear\" class=\"btn btn-link d-none\"><i class=\"slivki-icon-close-circled-o\"></i></button>
</div>
<div class=\"city-selector-list\">
";
// line 12
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getActiveSortedCityList(), function ($__city__) use ($context, $macros) { $context["city"] = $__city__; return (0 !== twig_compare(twig_get_attribute($this->env, $this->source, $context["city"], "getID", [], "method", false, false, false, 12), twig_constant("Slivki\\Entity\\City::TASHKENT_CITY_ID"))); }));
foreach ($context['_seq'] as $context["_key"] => $context["city"]) {
// line 13
echo " <a class=\"";
echo (((0 === twig_compare(twig_get_attribute($this->env, $this->source, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCurrentCity(), "getID", [], "method", false, false, false, 13), twig_get_attribute($this->env, $this->source, $context["city"], "getID", [], "method", false, false, false, 13)))) ? (" checked") : (""));
echo "\"
href=\"https://";
// line 14
echo twig_escape_filter($this->env, (twig_get_attribute($this->env, $this->source, $context["city"], "getDomain", [], "method", false, false, false, 14) . (isset($context["base_domain"]) || array_key_exists("base_domain", $context) ? $context["base_domain"] : (function () { throw new RuntimeError('Variable "base_domain" does not exist.', 14, $this->source); })())), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["city"], "getName", [], "method", false, false, false, 14), "html", null, true);
echo "<sup class=\"color-violet\"> ";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getActiveOffersCount(twig_get_attribute($this->env, $this->source, $context["city"], "getID", [], "method", false, false, false, 14)), "html", null, true);
echo "</sup></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 16
echo " </div>
</div>
</div>
</div>
";
// line 20
if (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.', 20, $this->source); })()), "request", [], "any", false, false, false, 20), "get", [0 => "showLocationConfirm"], "method", false, false, false, 20)) {
// line 21
echo " <div class=\"city-qa\">
<p>Ваш город ";
// line 22
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["currentCity"]) || array_key_exists("currentCity", $context) ? $context["currentCity"] : (function () { throw new RuntimeError('Variable "currentCity" does not exist.', 22, $this->source); })()), "getName", [], "method", false, false, false, 22), "html", null, true);
echo "?</p>
<div class=\"buttons\">
<div class=\"button button-violet\">Да, все верно</div>
<div class=\"button bg-white\">Нет, выбрать другой</div>
</div>
</div>
";
}
// line 29
echo "</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Slivki/city_selector.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 101 => 29, 91 => 22, 88 => 21, 86 => 20, 80 => 16, 68 => 14, 63 => 13, 59 => 12, 47 => 3, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"d-inline-block\">
<div class=\"city-selector-opener\">
<a href=\"javascript:void(0)\">{{ currentCity.getName() }}</a>
<div class=\"city-selector\">
<div style=\"width: 265px;\">
<div class=\"text-center text-nowrap border-bottom p-3\">Выберите местоположение</div>
<div class=\"border-bottom p-2 position-relative\">
<input id=\"citySearchInput\" type=\"text\" class=\"form-element\" placeholder=\"Поиск по названию\">
<button id=\"citySearchClear\" class=\"btn btn-link d-none\"><i class=\"slivki-icon-close-circled-o\"></i></button>
</div>
<div class=\"city-selector-list\">
{% for city in getActiveSortedCityList()|filter(city => city.getID() != constant('Slivki\\\\Entity\\\\City::TASHKENT_CITY_ID')) %}
<a class=\"{{ getCurrentCity().getID() == city.getID() ? ' checked' }}\"
href=\"https://{{ city.getDomain() ~ base_domain }}\">{{ city.getName() }}<sup class=\"color-violet\"> {{ getActiveOffersCount(city.getID()) }}</sup></a>
{% endfor %}
</div>
</div>
</div>
</div>
{% if app.request.get('showLocationConfirm')%}
<div class=\"city-qa\">
<p>Ваш город {{ currentCity.getName() }}?</p>
<div class=\"buttons\">
<div class=\"button button-violet\">Да, все верно</div>
<div class=\"button bg-white\">Нет, выбрать другой</div>
</div>
</div>
{% endif %}
</div>
", "Slivki/city_selector.html.twig", "/mnt/data/virtwww/vlad-slivki/templates/Slivki/city_selector.html.twig");
}
}