<?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/sale/index.html.twig */
class __TwigTemplate_2487a53987435d2eeb89dc2c9bf6ef5d3a22f4a3663195ad24958ea2d0454bee extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'ogimage' => [$this, 'block_ogimage'],
'header' => [$this, 'block_header'],
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
'content' => [$this, 'block_content'],
'mainColumnClass' => [$this, 'block_mainColumnClass'],
'main_content' => [$this, 'block_main_content'],
'teaserList' => [$this, 'block_teaserList'],
'popups' => [$this, 'block_popups'],
];
}
protected function doGetParent(array $context)
{
// line 4
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", "Slivki/sale/index.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/sale/index.html.twig"));
// line 1
$context["currentCategoryID"] = ((array_key_exists("currentCategoryID", $context)) ? ((isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 1, $this->source); })())) : (0));
// line 2
$context["yesterday"] = twig_date_format_filter($this->env, twig_date_modify_filter($this->env, "now", "-1 day"), "Y-m-d");
// line 3
$context["statViewer"] = (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); })()), "user", [], "any", false, false, false, 3) && 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); })()), "user", [], "any", false, false, false, 3), "hasRole", [0 => twig_constant("Slivki\\Entity\\UserGroup::STATISTICS_VIEWER")], "method", false, false, false, 3));
// line 4
$this->parent = $this->loadTemplate("base.html.twig", "Slivki/sale/index.html.twig", 4);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 6
public function block_ogimage($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", "ogimage"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "ogimage"));
// line 7
echo " ";
if (((array_key_exists("isVideoguideCategory", $context) && (isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 7, $this->source); })())) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 7, $this->source); })()), "category", [], "any", false, false, false, 7), "getHotFeedIconMedia", [], "method", false, false, false, 7))) {
// line 8
echo " <meta property=\"og:image\" content=\"";
echo twig_escape_filter($this->env, 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.', 8, $this->source); })()), "request", [], "any", false, false, false, 8), "getSchemeAndHttpHost", [], "method", false, false, false, 8), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 8, $this->source); })()), "category", [], "any", false, false, false, 8), "getHotFeedIconMedia", [], "method", false, false, false, 8), 128, 128), "html", null, true);
echo "\"/>
<meta property=\"og:image:width\" content=\"128\"/>
<meta property=\"og:image:height\" content=\"128\"/>
";
} else {
// line 12
echo " ";
$this->displayParentBlock("ogimage", $context, $blocks);
echo "
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 16
public function block_header($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", "header"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "header"));
// line 17
echo " ";
if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 18
echo " ";
$this->loadTemplate("header_sales_mobile.html.twig", "Slivki/sale/index.html.twig", 18)->display($context);
// line 19
echo " ";
} else {
// line 20
echo " ";
$this->loadTemplate("header_sales.html.twig", "Slivki/sale/index.html.twig", 20)->display($context);
// line 21
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 24
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 25
echo " ";
if (((array_key_exists("mainHotFeed", $context) && (1 === twig_compare(twig_length_filter($this->env, (isset($context["mainHotFeed"]) || array_key_exists("mainHotFeed", $context) ? $context["mainHotFeed"] : (function () { throw new RuntimeError('Variable "mainHotFeed" does not exist.', 25, $this->source); })())), 0))) || (array_key_exists("isVideoguideCategory", $context) && (isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 25, $this->source); })())))) {
// line 26
echo " <link rel=\"stylesheet\" href=\"/css/swiper/swiper.min.css\" />
";
}
// line 28
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 31
public function block_javascripts($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", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 32
echo " ";
if (((array_key_exists("mainHotFeed", $context) && (1 === twig_compare(twig_length_filter($this->env, (isset($context["mainHotFeed"]) || array_key_exists("mainHotFeed", $context) ? $context["mainHotFeed"] : (function () { throw new RuntimeError('Variable "mainHotFeed" does not exist.', 32, $this->source); })())), 0))) || (array_key_exists("isVideoguideCategory", $context) && (isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 32, $this->source); })())))) {
// line 33
echo " <script src=\"/js/swiper-js/swiper.min.js\"></script>
";
}
// line 35
echo " ";
if (array_key_exists("flierMenu", $context)) {
// line 36
echo " <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js\"></script>
";
}
// line 38
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script src=\"//api-maps.yandex.ru/2.1.29/?lang=ru-RU\"></script>
<script src=\"//mourner.github.io/simplify-js/simplify.js\"></script>
<script src=\"/js/sales.js?v=";
// line 41
echo twig_escape_filter($this->env, (isset($context["sales_js_version"]) || array_key_exists("sales_js_version", $context) ? $context["sales_js_version"] : (function () { throw new RuntimeError('Variable "sales_js_version" does not exist.', 41, $this->source); })()), "html", null, true);
echo "\"></script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 43
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 44
echo " <input type=\"hidden\" id=\"categoryID\" value=\"";
echo twig_escape_filter($this->env, (isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 44, $this->source); })()), "html", null, true);
echo "\"/>
<div class=\"content container transparent with-banner sales video-guide-block\" id=\"contentContainer\">
<div class=\"";
// line 46
$this->displayBlock('mainColumnClass', $context, $blocks);
echo "\">
<div class=\"content-wrapper\">
";
// line 48
if (array_key_exists("flierMenu", $context)) {
// line 49
echo " <div class=\"stock-group-header with-search\">
";
// line 50
if ((1 === twig_compare((isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 50, $this->source); })()), 0))) {
// line 51
echo " <div class=\"breadcrumbs\">
<a href=\"";
// line 52
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 52, $this->source); })()), "html", null, true);
echo "\">Главная</a>
";
// line 53
if ( !array_key_exists("isChildOfFlier", $context)) {
// line 54
echo " <i class=\"fa fa-angle-right\"></i> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 54, $this->source); })()), "category", [], "any", false, false, false, 54), "getName", [], "method", false, false, false, 54), "html", null, true);
echo "
";
} else {
// line 56
echo " <i class=\"fa fa-angle-right\"></i><a href=\"";
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 56, $this->source); })()), "html", null, true);
echo "/giper-shop\"> Листовки</a>
<i class=\"fa fa-angle-right\"></i> ";
// line 57
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 57, $this->source); })()), "category", [], "any", false, false, false, 57), "getName", [], "method", false, false, false, 57), "html", null, true);
echo "
";
}
// line 59
echo " </div>
<div class=\"title\"><h1>";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 60, $this->source); })()), "category", [], "any", false, false, false, 60), "getName", [], "method", false, false, false, 60), "html", null, true);
echo "</h1> (";
echo twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 60, $this->source); })()), "entityList", [], "any", false, false, false, 60)), "html", null, true);
echo ")</div>
";
} else {
// line 62
echo " <div class=\"title\"><h1>Листовки</h1> (";
echo twig_escape_filter($this->env, (isset($context["flierMenuCount"]) || array_key_exists("flierMenuCount", $context) ? $context["flierMenuCount"] : (function () { throw new RuntimeError('Variable "flierMenuCount" does not exist.', 62, $this->source); })()), "html", null, true);
echo ")</div>
";
}
// line 64
echo " <div class=\"flier-total-visit-count\">
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='";
// line 65
echo twig_escape_filter($this->env, (isset($context["saleVisitCountTooltip"]) || array_key_exists("saleVisitCountTooltip", $context) ? $context["saleVisitCountTooltip"] : (function () { throw new RuntimeError('Variable "saleVisitCountTooltip" does not exist.', 65, $this->source); })()), "html", null, true);
echo "\"'><i class=\"slivki-icon-users\"></i>";
echo twig_escape_filter($this->env, (isset($context["saleVisitCount"]) || array_key_exists("saleVisitCount", $context) ? $context["saleVisitCount"] : (function () { throw new RuntimeError('Variable "saleVisitCount" does not exist.', 65, $this->source); })()), "html", null, true);
echo "</span><br>
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='";
// line 66
echo twig_escape_filter($this->env, (isset($context["visitedSalesTooltip"]) || array_key_exists("visitedSalesTooltip", $context) ? $context["visitedSalesTooltip"] : (function () { throw new RuntimeError('Variable "visitedSalesTooltip" does not exist.', 66, $this->source); })()), "html", null, true);
echo "'><i class=\"slivki-icon-paper\"></i>";
echo twig_escape_filter($this->env, (isset($context["visitedSales"]) || array_key_exists("visitedSales", $context) ? $context["visitedSales"] : (function () { throw new RuntimeError('Variable "visitedSales" does not exist.', 66, $this->source); })()), "html", null, true);
echo "</span>
</div>
<div class=\"clear\"></div>
</div>
<ul id=\"saleTopMenu\" class=\"capsule-menu expanded\">
";
// line 71
$context["flierCompanyNewsMenuItem"] = null;
// line 72
echo " ";
if ((1 === twig_compare(twig_length_filter($this->env, (isset($context["flierMenu"]) || array_key_exists("flierMenu", $context) ? $context["flierMenu"] : (function () { throw new RuntimeError('Variable "flierMenu" does not exist.', 72, $this->source); })())), 1))) {
// line 73
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["flierMenu"]) || array_key_exists("flierMenu", $context) ? $context["flierMenu"] : (function () { throw new RuntimeError('Variable "flierMenu" does not exist.', 73, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 74
echo " ";
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["item"], "getEntityID", [], "method", false, false, false, 74), twig_constant("Slivki\\Entity\\Category::FLIER_COMPANY_NEWS_CATEGORY_ID")))) {
// line 75
echo " ";
$context["flierCompanyNewsMenuItem"] = $context["item"];
// line 76
echo " ";
} else {
// line 77
echo " <li>
<a href=\"";
// line 78
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "getURL", [], "method", false, false, false, 78), "html", null, true);
((array_key_exists("selectedCity", $context)) ? (print (twig_escape_filter($this->env, ("?city=" . (isset($context["selectedCity"]) || array_key_exists("selectedCity", $context) ? $context["selectedCity"] : (function () { throw new RuntimeError('Variable "selectedCity" does not exist.', 78, $this->source); })())), "html", null, true))) : (print ("")));
echo "\" ";
echo (((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["item"], "getEntityID", [], "method", false, false, false, 78), (isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 78, $this->source); })())))) ? ("class=\"active\"") : (""));
echo " data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "getEntityID", [], "method", false, false, false, 78), "html", null, true);
echo "\">
";
// line 79
echo twig_escape_filter($this->env, (((0 !== twig_compare(twig_get_attribute($this->env, $this->source, $context["item"], "getAlias", [], "method", false, false, false, 79), null))) ? (twig_get_attribute($this->env, $this->source, $context["item"], "getAlias", [], "method", false, false, false, 79)) : (twig_get_attribute($this->env, $this->source, $context["item"], "getName", [], "method", false, false, false, 79))), "html", null, true);
echo " <span>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "getEntityCount", [], "method", false, false, false, 79), "html", null, true);
echo "</span>
</a>
</li>
";
}
// line 83
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 84
echo " ";
if ((isset($context["flierCompanyNewsMenuItem"]) || array_key_exists("flierCompanyNewsMenuItem", $context) ? $context["flierCompanyNewsMenuItem"] : (function () { throw new RuntimeError('Variable "flierCompanyNewsMenuItem" does not exist.', 84, $this->source); })())) {
// line 85
echo " ";
$context["item"] = (isset($context["flierCompanyNewsMenuItem"]) || array_key_exists("flierCompanyNewsMenuItem", $context) ? $context["flierCompanyNewsMenuItem"] : (function () { throw new RuntimeError('Variable "flierCompanyNewsMenuItem" does not exist.', 85, $this->source); })());
// line 86
echo " <li>
<a href=\"";
// line 87
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 87, $this->source); })()), "getURL", [], "method", false, false, false, 87), "html", null, true);
echo "\" ";
echo (((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 87, $this->source); })()), "getEntityID", [], "method", false, false, false, 87), (isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 87, $this->source); })())))) ? ("class=\"active\"") : (""));
echo " data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 87, $this->source); })()), "getEntityID", [], "method", false, false, false, 87), "html", null, true);
echo "\">
";
// line 88
echo twig_escape_filter($this->env, (((0 !== twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 88, $this->source); })()), "getAlias", [], "method", false, false, false, 88), null))) ? (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 88, $this->source); })()), "getAlias", [], "method", false, false, false, 88)) : (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 88, $this->source); })()), "getName", [], "method", false, false, false, 88))), "html", null, true);
echo " <span>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 88, $this->source); })()), "getEntityCount", [], "method", false, false, false, 88), "html", null, true);
echo "</span>
</a>
</li>
";
}
// line 92
echo " ";
}
// line 93
echo " </ul>
<div class=\"clear\"></div>
<div id=\"flierCitySelectBox\">
<div class=\"title\">Выберите свой город</div>
";
// line 97
ob_start();
// line 98
echo " <ul id=\"flierFirstLetterCityFilters\">
";
// line 99
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_array_keys_filter((isset($context["cityList"]) || array_key_exists("cityList", $context) ? $context["cityList"] : (function () { throw new RuntimeError('Variable "cityList" does not exist.', 99, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["char"]) {
// line 100
echo " <li><a href=\"#\" data-char=\"";
echo twig_escape_filter($this->env, $context["char"], "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["char"], "html", null, true);
echo "</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['char'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 102
echo " </ul>
<div id=\"flierCitySelectList\">
";
// line 104
$context["cityColumnCount"] = 6;
// line 105
echo " ";
$context["itemInColumnCount"] = twig_round((twig_length_filter($this->env, twig_constant("Slivki\\Entity\\City::FLIER_DEFAULT_CITY_LIST")) / (isset($context["cityColumnCount"]) || array_key_exists("cityColumnCount", $context) ? $context["cityColumnCount"] : (function () { throw new RuntimeError('Variable "cityColumnCount" does not exist.', 105, $this->source); })())), 1, "ceil");
// line 106
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_batch(twig_constant("Slivki\\Entity\\City::FLIER_DEFAULT_CITY_LIST"), (isset($context["itemInColumnCount"]) || array_key_exists("itemInColumnCount", $context) ? $context["itemInColumnCount"] : (function () { throw new RuntimeError('Variable "itemInColumnCount" does not exist.', 106, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 107
echo " <ul class=\"char-div\">
";
// line 108
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["row"]);
foreach ($context['_seq'] as $context["_key"] => $context["defaultCity"]) {
// line 109
echo " <li class=\"default-city-li ";
echo (((array_key_exists("selectedCity", $context) && (0 === twig_compare((isset($context["selectedCity"]) || array_key_exists("selectedCity", $context) ? $context["selectedCity"] : (function () { throw new RuntimeError('Variable "selectedCity" does not exist.', 109, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["defaultCity"], "name", [], "any", false, false, false, 109))))) ? ("active") : (""));
echo "\" data-char=\"";
echo twig_escape_filter($this->env, twig_first($this->env, twig_get_attribute($this->env, $this->source, $context["defaultCity"], "name", [], "any", false, false, false, 109)), "html", null, true);
echo "\">
<a href=\"";
// line 110
echo twig_escape_filter($this->env, 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.', 110, $this->source); })()), "request", [], "any", false, false, false, 110), "pathInfo", [], "any", false, false, false, 110), "html", null, true);
echo "?city=";
echo twig_escape_filter($this->env, twig_urlencode_filter(twig_get_attribute($this->env, $this->source, $context["defaultCity"], "name", [], "any", false, false, false, 110)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["defaultCity"], "name", [], "any", false, false, false, 110), "html", null, true);
echo " <span data-toggle=\"tooltip\" data-placement=\"top\" data-original-title=\"Количество жителей\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["defaultCity"], "population", [], "any", false, false, false, 110), "html", null, true);
echo "</span></a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['defaultCity'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 113
echo " </ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['row'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 115
echo " ";
$context["currentChar"] = twig_first($this->env, twig_get_array_keys_filter((isset($context["cityList"]) || array_key_exists("cityList", $context) ? $context["cityList"] : (function () { throw new RuntimeError('Variable "cityList" does not exist.', 115, $this->source); })())));
// line 116
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_array_keys_filter((isset($context["cityList"]) || array_key_exists("cityList", $context) ? $context["cityList"] : (function () { throw new RuntimeError('Variable "cityList" does not exist.', 116, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["char"]) {
// line 117
echo " ";
$context["itemInColumnCount"] = twig_round((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["cityList"]) || array_key_exists("cityList", $context) ? $context["cityList"] : (function () { throw new RuntimeError('Variable "cityList" does not exist.', 117, $this->source); })()), $context["char"], [], "array", false, false, false, 117)) / (isset($context["cityColumnCount"]) || array_key_exists("cityColumnCount", $context) ? $context["cityColumnCount"] : (function () { throw new RuntimeError('Variable "cityColumnCount" does not exist.', 117, $this->source); })())), 1, "ceil");
// line 118
echo " <div data-char=\"";
echo twig_escape_filter($this->env, $context["char"], "html", null, true);
echo "\" class=\"char-div\">
";
// line 119
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_batch(twig_get_attribute($this->env, $this->source, (isset($context["cityList"]) || array_key_exists("cityList", $context) ? $context["cityList"] : (function () { throw new RuntimeError('Variable "cityList" does not exist.', 119, $this->source); })()), $context["char"], [], "array", false, false, false, 119), (isset($context["itemInColumnCount"]) || array_key_exists("itemInColumnCount", $context) ? $context["itemInColumnCount"] : (function () { throw new RuntimeError('Variable "itemInColumnCount" does not exist.', 119, $this->source); })())));
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 120
echo " <ul>
";
// line 121
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["row"]);
foreach ($context['_seq'] as $context["_key"] => $context["city"]) {
// line 122
echo " <li ";
echo (((array_key_exists("selectedCity", $context) && (0 === twig_compare((isset($context["selectedCity"]) || array_key_exists("selectedCity", $context) ? $context["selectedCity"] : (function () { throw new RuntimeError('Variable "selectedCity" does not exist.', 122, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["city"], "cityName", [], "any", false, false, false, 122))))) ? ("class=active") : (""));
echo ">
<a href=\"";
// line 123
echo twig_escape_filter($this->env, 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.', 123, $this->source); })()), "request", [], "any", false, false, false, 123), "pathInfo", [], "any", false, false, false, 123), "html", null, true);
echo "?city=";
echo twig_escape_filter($this->env, twig_urlencode_filter(twig_get_attribute($this->env, $this->source, $context["city"], "cityName", [], "any", false, false, false, 123)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["city"], "cityName", [], "any", false, false, false, 123), "html", null, true);
echo "</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['city'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 126
echo " </ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['row'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 128
echo " </div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['char'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 130
echo " </div>
";
$___internal_parse_0_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 97
echo twig_spaceless($___internal_parse_0_);
// line 132
echo " </div>
";
// line 133
$this->loadTemplate("Slivki/sale/sale_map.html.twig", "Slivki/sale/index.html.twig", 133)->display($context);
// line 134
echo " ";
}
// line 135
echo "
";
// line 136
$this->displayBlock('main_content', $context, $blocks);
// line 258
echo " </div>
</div>
</div>
";
// line 261
echo $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getFooter($this->env);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 46
public function block_mainColumnClass($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", "mainColumnClass"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainColumnClass"));
echo " ";
$this->displayParentBlock("mainColumnClass", $context, $blocks);
echo " one-column sales ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 136
public function block_main_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", "main_content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main_content"));
// line 137
echo " ";
if ( !array_key_exists("flierMenu", $context)) {
// line 138
echo " <div class=\"stock-group-header with-search\">
";
// line 139
if ((1 === twig_compare((isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 139, $this->source); })()), 0))) {
// line 140
echo " ";
if ((array_key_exists("isChildOfVideoGuide", $context) && (isset($context["isChildOfVideoGuide"]) || array_key_exists("isChildOfVideoGuide", $context) ? $context["isChildOfVideoGuide"] : (function () { throw new RuntimeError('Variable "isChildOfVideoGuide" does not exist.', 140, $this->source); })()))) {
// line 141
echo " <div class=\"breadcrumbs\">
<a href=\"";
// line 142
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 142, $this->source); })()), "html", null, true);
echo "\">Главная</a>
<i class=\"fa fa-angle-right\"></i><a href=\"";
// line 143
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getURL("Slivki:Sale:category", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["videoguideCategory"]) || array_key_exists("videoguideCategory", $context) ? $context["videoguideCategory"] : (function () { throw new RuntimeError('Variable "videoguideCategory" does not exist.', 143, $this->source); })()), "category", [], "any", false, false, false, 143), "getID", [], "method", false, false, false, 143)), "html", null, true);
echo "\"> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["videoguideCategory"]) || array_key_exists("videoguideCategory", $context) ? $context["videoguideCategory"] : (function () { throw new RuntimeError('Variable "videoguideCategory" does not exist.', 143, $this->source); })()), "category", [], "any", false, false, false, 143), "getName", [], "method", false, false, false, 143), "html", null, true);
echo "</a>
<i class=\"fa fa-angle-right\"></i> ";
// line 144
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 144, $this->source); })()), "category", [], "any", false, false, false, 144), "getName", [], "method", false, false, false, 144), "html", null, true);
echo "
</div>
";
} elseif ((0 === twig_compare( // line 146
(isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 146, $this->source); })()), twig_constant("Slivki\\Entity\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID")))) {
// line 147
echo " <div class=\"breadcrumbs\">
<a href=\"";
// line 148
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 148, $this->source); })()), "html", null, true);
echo "\">Главная</a>
<i class=\"fa fa-angle-right\"></i> ";
// line 149
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 149, $this->source); })()), "category", [], "any", false, false, false, 149), "getName", [], "method", false, false, false, 149), "html", null, true);
echo "
</div>
";
} else {
// line 152
echo " <div class=\"breadcrumbs\">
<a href=\"";
// line 153
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 153, $this->source); })()), "html", null, true);
echo "\">Главная</a>
<i class=\"fa fa-angle-right\"></i><a href=\"";
// line 154
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 154, $this->source); })()), "html", null, true);
echo "/skidki-i-rasprodazhi\"> Новости скидок</a>
";
// line 155
if (array_key_exists("parentCategory", $context)) {
// line 156
echo " <i class=\"fa fa-angle-right\"></i><a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getURL("Slivki:Sale:category", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 156, $this->source); })()), "category", [], "any", false, false, false, 156), "getID", [], "method", false, false, false, 156)), "html", null, true);
echo "\"> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 156, $this->source); })()), "category", [], "any", false, false, false, 156), "getName", [], "method", false, false, false, 156), "html", null, true);
echo "</a>
";
}
// line 158
echo " <i class=\"fa fa-angle-right\"></i> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 158, $this->source); })()), "category", [], "any", false, false, false, 158), "getName", [], "method", false, false, false, 158), "html", null, true);
echo "
</div>
";
}
// line 161
echo " <div class=\"title\"><h1>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 161, $this->source); })()), "category", [], "any", false, false, false, 161), "getName", [], "method", false, false, false, 161), "html", null, true);
echo "</h1> (";
((twig_get_attribute($this->env, $this->source, ($context["currentCategory"] ?? null), "entityList", [], "any", true, true, false, 161)) ? (print (twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["currentCategory"]) || array_key_exists("currentCategory", $context) ? $context["currentCategory"] : (function () { throw new RuntimeError('Variable "currentCategory" does not exist.', 161, $this->source); })()), "entityList", [], "any", false, false, false, 161)), "html", null, true))) : (print (0)));
echo ")</div>
";
} else {
// line 163
echo " <div class=\"breadcrumbs\">
<a href=\"";
// line 164
echo twig_escape_filter($this->env, (isset($context["base_url"]) || array_key_exists("base_url", $context) ? $context["base_url"] : (function () { throw new RuntimeError('Variable "base_url" does not exist.', 164, $this->source); })()), "html", null, true);
echo "\">Главная</a>
<i class=\"fa fa-angle-right\"></i> Новости скидок
</div>
<div class=\"clear\"></div>
<div class=\"title-wrap text-center\">
<div class=\"title\"><h1>";
// line 169
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["metaInfo"]) || array_key_exists("metaInfo", $context) ? $context["metaInfo"] : (function () { throw new RuntimeError('Variable "metaInfo" does not exist.', 169, $this->source); })()), "title", [], "any", false, false, false, 169), "html", null, true);
echo " Новости скидок</h1> (";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getActiveSalesCount(), "html", null, true);
echo ")</div>
";
}
// line 171
echo " ";
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 172
echo " <div class=\"flier-total-visit-count\">
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='";
// line 173
echo twig_escape_filter($this->env, (isset($context["saleVisitCountTooltip"]) || array_key_exists("saleVisitCountTooltip", $context) ? $context["saleVisitCountTooltip"] : (function () { throw new RuntimeError('Variable "saleVisitCountTooltip" does not exist.', 173, $this->source); })()), "html", null, true);
echo "'><i class=\"slivki-icon-users\"></i>";
echo twig_escape_filter($this->env, (isset($context["saleVisitCount"]) || array_key_exists("saleVisitCount", $context) ? $context["saleVisitCount"] : (function () { throw new RuntimeError('Variable "saleVisitCount" does not exist.', 173, $this->source); })()), "html", null, true);
echo "</span><br>
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='";
// line 174
echo twig_escape_filter($this->env, (isset($context["visitedSalesTooltip"]) || array_key_exists("visitedSalesTooltip", $context) ? $context["visitedSalesTooltip"] : (function () { throw new RuntimeError('Variable "visitedSalesTooltip" does not exist.', 174, $this->source); })()), "html", null, true);
echo "'><i class=\"slivki-icon-paper\"></i>";
echo twig_escape_filter($this->env, (isset($context["visitedSales"]) || array_key_exists("visitedSales", $context) ? $context["visitedSales"] : (function () { throw new RuntimeError('Variable "visitedSales" does not exist.', 174, $this->source); })()), "html", null, true);
echo "</span>
</div>
";
}
// line 177
echo " <div class=\"clear\"></div>
</div>
</div>
";
// line 181
if (( !array_key_exists("isVideoguideCategory", $context) || !(isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 181, $this->source); })()))) {
// line 182
echo " ";
$context["saleMenu"] = ((array_key_exists("saleMenu", $context)) ? ((isset($context["saleMenu"]) || array_key_exists("saleMenu", $context) ? $context["saleMenu"] : (function () { throw new RuntimeError('Variable "saleMenu" does not exist.', 182, $this->source); })())) : ((isset($context["categoryList"]) || array_key_exists("categoryList", $context) ? $context["categoryList"] : (function () { throw new RuntimeError('Variable "categoryList" does not exist.', 182, $this->source); })())));
// line 183
echo " ";
if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 184
echo " <div id=\"mustBeFixedContainer\">
<div id=\"mustBeFixed\">
";
}
// line 187
echo " <ul id=\"saleTopMenu\" class=\"capsule-menu pb-2\">
";
// line 188
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["saleMenu"]) || array_key_exists("saleMenu", $context) ? $context["saleMenu"] : (function () { throw new RuntimeError('Variable "saleMenu" does not exist.', 188, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 189
echo " <li>
<a href=\"";
// line 190
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getURL("Slivki:Sale:category", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 190), "getID", [], "method", false, false, false, 190)), "html", null, true);
echo "\" ";
echo (((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 190), "getID", [], "method", false, false, false, 190), (isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 190, $this->source); })())))) ? ("class=\"active\"") : (""));
echo " data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 190), "getID", [], "method", false, false, false, 190), "html", null, true);
echo "\">
";
// line 191
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 191), "getName", [], "method", false, false, false, 191), "html", null, true);
echo "
";
// line 192
if ((isset($context["statViewer"]) || array_key_exists("statViewer", $context) ? $context["statViewer"] : (function () { throw new RuntimeError('Variable "statViewer" does not exist.', 192, $this->source); })())) {
// line 193
echo " (";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getStatVisitCount(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 193), "getID", [], "method", false, false, false, 193), twig_constant("Slivki\\Entity\\Visit::TYPE_SALE_CATEGORY"), (isset($context["yesterday"]) || array_key_exists("yesterday", $context) ? $context["yesterday"] : (function () { throw new RuntimeError('Variable "yesterday" does not exist.', 193, $this->source); })()), (isset($context["yesterday"]) || array_key_exists("yesterday", $context) ? $context["yesterday"] : (function () { throw new RuntimeError('Variable "yesterday" does not exist.', 193, $this->source); })())), "html", null, true);
echo ")
";
}
// line 195
echo " <span>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 195), "getEntityCount", [], "method", false, false, false, 195), "html", null, true);
echo "</span>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 199
echo " <li class=\"capsule-menu--collapse-btn\">
<a href=\"javascript:void(0)\" class=\"active\">Свернуть</a>
</li>
<li class=\"capsule-menu--expand-btn\">
<a href=\"javascript:void(0)\"><i class=\"slivki-icon-dot-3\"></i></a>
</li>
</ul>
";
// line 206
if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 207
echo " </div>
</div>
";
}
// line 210
echo " ";
}
// line 211
echo " ";
if ((array_key_exists("isVideoguideCategory", $context) && (isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 211, $this->source); })()))) {
// line 212
echo " ";
ob_start();
// line 213
echo " <div id=\"videoguideCategoryMenu\" class=\"";
echo (( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) ? ("swiper-container") : (""));
echo "\">
<div class=\"";
// line 214
echo (( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) ? ("swiper-wrapper") : (""));
echo "\">
";
// line 215
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_array_filter($this->env, (isset($context["videoguideCategoryMenu"]) || array_key_exists("videoguideCategoryMenu", $context) ? $context["videoguideCategoryMenu"] : (function () { throw new RuntimeError('Variable "videoguideCategoryMenu" does not exist.', 215, $this->source); })()), function ($__category__) use ($context, $macros) { $context["category"] = $__category__; return (0 !== twig_compare(twig_get_attribute($this->env, $this->source, $context["category"], "getID", [], "method", false, false, false, 215), twig_constant("Slivki\\Entity\\Category::SALE_VIDEO_GUIDE_AUTORS_CATEGORY_ID"))); }));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 216
echo " ";
$context["categoryUrl"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getURL("Slivki:Sale:category", twig_get_attribute($this->env, $this->source, $context["category"], "getID", [], "method", false, false, false, 216));
// line 217
echo " <a class=\"";
echo (( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) ? ("swiper-slide") : (""));
echo " ";
echo (((0 === twig_compare((isset($context["categoryUrl"]) || array_key_exists("categoryUrl", $context) ? $context["categoryUrl"] : (function () { throw new RuntimeError('Variable "categoryUrl" does not exist.', 217, $this->source); })()), 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.', 217, $this->source); })()), "request", [], "any", false, false, false, 217), "pathinfo", [], "any", false, false, false, 217)))) ? ("active") : (""));
echo "\" href=\"";
echo twig_escape_filter($this->env, (isset($context["categoryUrl"]) || array_key_exists("categoryUrl", $context) ? $context["categoryUrl"] : (function () { throw new RuntimeError('Variable "categoryUrl" does not exist.', 217, $this->source); })()), "html", null, true);
echo "\">
<img src=\"";
// line 218
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, $context["category"], "getHotFeedIconMedia", [], "method", false, false, false, 218), 128, 128), "html", null, true);
echo "\" alt=''/>
<br />
";
// line 220
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "getName", [], "method", false, false, false, 220), "html", null, true);
echo "
";
// line 221
if ((isset($context["statViewer"]) || array_key_exists("statViewer", $context) ? $context["statViewer"] : (function () { throw new RuntimeError('Variable "statViewer" does not exist.', 221, $this->source); })())) {
// line 222
echo " (";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getStatVisitCount(twig_get_attribute($this->env, $this->source, $context["category"], "getID", [], "method", false, false, false, 222), twig_constant("Slivki\\Entity\\Visit::TYPE_SALE_CATEGORY"), (isset($context["yesterday"]) || array_key_exists("yesterday", $context) ? $context["yesterday"] : (function () { throw new RuntimeError('Variable "yesterday" does not exist.', 222, $this->source); })()), (isset($context["yesterday"]) || array_key_exists("yesterday", $context) ? $context["yesterday"] : (function () { throw new RuntimeError('Variable "yesterday" does not exist.', 222, $this->source); })())), "html", null, true);
echo ")
";
}
// line 224
echo " </a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 226
echo " </div>
<div class=\"swiper-button swiper-button-prev\"></div>
<div class=\"swiper-button swiper-button-next\"></div>
</div>
";
$___internal_parse_1_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 212
echo twig_spaceless($___internal_parse_1_);
// line 231
echo " ";
}
// line 232
echo "
";
// line 233
if (( !array_key_exists("isVideoguideCategory", $context) || !(isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 233, $this->source); })()))) {
// line 234
echo " ";
$this->loadTemplate("Slivki/sale/sale_map.html.twig", "Slivki/sale/index.html.twig", 234)->display($context);
// line 235
echo " ";
}
// line 236
echo " ";
if ((array_key_exists("mainHotFeed", $context) && (1 === twig_compare(twig_length_filter($this->env, (isset($context["mainHotFeed"]) || array_key_exists("mainHotFeed", $context) ? $context["mainHotFeed"] : (function () { throw new RuntimeError('Variable "mainHotFeed" does not exist.', 236, $this->source); })())), 0)))) {
// line 237
echo " <div id=\"mainHotFeed\" class=\"sales-hot-feed\">
<div class=\"title\"><i> </i> ГОРЯЧАЯ ЛЕНТА</div>
<div class=\"swiper-container\" id=\"mainHotFeedSlider\" data-offset=\"0\" data-type=\"";
// line 239
echo twig_escape_filter($this->env, twig_constant("Slivki\\Entity\\HotFeed::TYPE_MAIN_PAGE"), "html", null, true);
echo "\">
<div class=\"swiper-wrapper\">
";
// line 241
echo (isset($context["mainHotFeed"]) || array_key_exists("mainHotFeed", $context) ? $context["mainHotFeed"] : (function () { throw new RuntimeError('Variable "mainHotFeed" does not exist.', 241, $this->source); })());
echo "
</div>
<div class=\"swiper-button swiper-button-prev\"></div>
<div class=\"swiper-button swiper-button-next\"></div>
</div>
</div>
";
}
// line 248
echo " ";
}
// line 249
echo " ";
$this->displayBlock('teaserList', $context, $blocks);
// line 257
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 249
public function block_teaserList($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", "teaserList"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "teaserList"));
// line 250
echo " <div id=\"saleIndexTeasers\">
";
// line 251
$this->loadTemplate("Slivki/sale/sale_list_box.html.twig", "Slivki/sale/index.html.twig", 251)->display(twig_array_merge($context, ["noCategoryTitle" => (array_key_exists("isVideoguideCategory", $context) && (isset($context["isVideoguideCategory"]) || array_key_exists("isVideoguideCategory", $context) ? $context["isVideoguideCategory"] : (function () { throw new RuntimeError('Variable "isVideoguideCategory" does not exist.', 251, $this->source); })()))]));
// line 252
echo " ";
if ((0 === twig_compare((isset($context["currentCategoryID"]) || array_key_exists("currentCategoryID", $context) ? $context["currentCategoryID"] : (function () { throw new RuntimeError('Variable "currentCategoryID" does not exist.', 252, $this->source); })()), 0))) {
// line 253
echo " <div id=\"saleCategoryListLoader\"><i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i></div>
";
}
// line 255
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 264
public function block_popups($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", "popups"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "popups"));
// line 265
echo " ";
$this->displayParentBlock("popups", $context, $blocks);
echo "
";
// line 266
$this->loadTemplate("Slivki/popups/video_guide_popup.html.twig", "Slivki/sale/index.html.twig", 266)->display($context);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Slivki/sale/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 941 => 266, 936 => 265, 926 => 264, 915 => 255, 911 => 253, 908 => 252, 906 => 251, 903 => 250, 893 => 249, 883 => 257, 880 => 249, 877 => 248, 867 => 241, 862 => 239, 858 => 237, 855 => 236, 852 => 235, 849 => 234, 847 => 233, 844 => 232, 841 => 231, 839 => 212, 832 => 226, 825 => 224, 819 => 222, 817 => 221, 813 => 220, 808 => 218, 799 => 217, 796 => 216, 792 => 215, 788 => 214, 783 => 213, 780 => 212, 777 => 211, 774 => 210, 769 => 207, 767 => 206, 758 => 199, 747 => 195, 741 => 193, 739 => 192, 735 => 191, 727 => 190, 724 => 189, 720 => 188, 717 => 187, 712 => 184, 709 => 183, 706 => 182, 704 => 181, 698 => 177, 690 => 174, 684 => 173, 681 => 172, 678 => 171, 671 => 169, 663 => 164, 660 => 163, 652 => 161, 645 => 158, 637 => 156, 635 => 155, 631 => 154, 627 => 153, 624 => 152, 618 => 149, 614 => 148, 611 => 147, 609 => 146, 604 => 144, 598 => 143, 594 => 142, 591 => 141, 588 => 140, 586 => 139, 583 => 138, 580 => 137, 570 => 136, 549 => 46, 537 => 261, 532 => 258, 530 => 136, 527 => 135, 524 => 134, 522 => 133, 519 => 132, 517 => 97, 513 => 130, 506 => 128, 499 => 126, 486 => 123, 481 => 122, 477 => 121, 474 => 120, 470 => 119, 465 => 118, 462 => 117, 457 => 116, 454 => 115, 447 => 113, 432 => 110, 425 => 109, 421 => 108, 418 => 107, 413 => 106, 410 => 105, 408 => 104, 404 => 102, 393 => 100, 389 => 99, 386 => 98, 384 => 97, 378 => 93, 375 => 92, 366 => 88, 358 => 87, 355 => 86, 352 => 85, 349 => 84, 343 => 83, 334 => 79, 325 => 78, 322 => 77, 319 => 76, 316 => 75, 313 => 74, 308 => 73, 305 => 72, 303 => 71, 293 => 66, 287 => 65, 284 => 64, 278 => 62, 271 => 60, 268 => 59, 263 => 57, 258 => 56, 252 => 54, 250 => 53, 246 => 52, 243 => 51, 241 => 50, 238 => 49, 236 => 48, 231 => 46, 225 => 44, 215 => 43, 203 => 41, 196 => 38, 192 => 36, 189 => 35, 185 => 33, 182 => 32, 172 => 31, 159 => 28, 155 => 26, 152 => 25, 142 => 24, 131 => 21, 128 => 20, 125 => 19, 122 => 18, 119 => 17, 109 => 16, 95 => 12, 86 => 8, 83 => 7, 73 => 6, 62 => 4, 60 => 3, 58 => 2, 56 => 1, 43 => 4,);
}
public function getSourceContext()
{
return new Source("{% set currentCategoryID = currentCategoryID is defined ? currentCategoryID : 0 %}
{% set yesterday = 'now'|date_modify(\"-1 day\")|date(\"Y-m-d\") %}
{% set statViewer = app.user and app.user.hasRole(constant('Slivki\\\\Entity\\\\UserGroup::STATISTICS_VIEWER')) %}
{% extends 'base.html.twig' %}
{% block ogimage %}
{% if isVideoguideCategory is defined and isVideoguideCategory and currentCategory.category.getHotFeedIconMedia() %}
<meta property=\"og:image\" content=\"{{ app.request.getSchemeAndHttpHost() }}{{ getImageURL(currentCategory.category.getHotFeedIconMedia(), 128, 128) }}\"/>
<meta property=\"og:image:width\" content=\"128\"/>
<meta property=\"og:image:height\" content=\"128\"/>
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block header %}
{% if isMobileDevice() %}
{% include 'header_sales_mobile.html.twig' %}
{% else %}
{% include 'header_sales.html.twig' %}
{% endif %}
{% endblock %}
{% block stylesheets %}
{% if mainHotFeed is defined and mainHotFeed|length > 0 or (isVideoguideCategory is defined and isVideoguideCategory) %}
<link rel=\"stylesheet\" href=\"/css/swiper/swiper.min.css\" />
{% endif %}
{{ parent() }}
{% endblock %}
{% block javascripts %}
{% if mainHotFeed is defined and mainHotFeed|length > 0 or (isVideoguideCategory is defined and isVideoguideCategory) %}
<script src=\"/js/swiper-js/swiper.min.js\"></script>
{% endif %}
{% if flierMenu is defined %}
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js\"></script>
{% endif %}
{{ parent() }}
<script src=\"//api-maps.yandex.ru/2.1.29/?lang=ru-RU\"></script>
<script src=\"//mourner.github.io/simplify-js/simplify.js\"></script>
<script src=\"/js/sales.js?v={{ sales_js_version }}\"></script>
{% endblock %}
{% block content %}
<input type=\"hidden\" id=\"categoryID\" value=\"{{ currentCategoryID }}\"/>
<div class=\"content container transparent with-banner sales video-guide-block\" id=\"contentContainer\">
<div class=\"{% block mainColumnClass %} {{ parent() }} one-column sales {% endblock %}\">
<div class=\"content-wrapper\">
{% if flierMenu is defined %}
<div class=\"stock-group-header with-search\">
{% if currentCategoryID > 0 %}
<div class=\"breadcrumbs\">
<a href=\"{{ base_url }}\">Главная</a>
{% if isChildOfFlier is not defined %}
<i class=\"fa fa-angle-right\"></i> {{ currentCategory.category.getName() }}
{% else %}
<i class=\"fa fa-angle-right\"></i><a href=\"{{ base_url }}/giper-shop\"> Листовки</a>
<i class=\"fa fa-angle-right\"></i> {{ currentCategory.category.getName() }}
{% endif %}
</div>
<div class=\"title\"><h1>{{ currentCategory.category.getName() }}</h1> ({{ currentCategory.entityList|length }})</div>
{% else %}
<div class=\"title\"><h1>Листовки</h1> ({{ flierMenuCount }})</div>
{% endif %}
<div class=\"flier-total-visit-count\">
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='{{ saleVisitCountTooltip }}\"'><i class=\"slivki-icon-users\"></i>{{ saleVisitCount }}</span><br>
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='{{ visitedSalesTooltip }}'><i class=\"slivki-icon-paper\"></i>{{ visitedSales }}</span>
</div>
<div class=\"clear\"></div>
</div>
<ul id=\"saleTopMenu\" class=\"capsule-menu expanded\">
{% set flierCompanyNewsMenuItem = null %}
{% if flierMenu|length > 1 %}
{% for item in flierMenu %}
{% if item.getEntityID() == constant('Slivki\\\\Entity\\\\Category::FLIER_COMPANY_NEWS_CATEGORY_ID') %}
{% set flierCompanyNewsMenuItem = item %}
{% else %}
<li>
<a href=\"{{ item.getURL() }}{{ selectedCity is defined ? '?city=' ~ selectedCity }}\" {{ item.getEntityID() == currentCategoryID ? 'class=\"active\"'}} data-id=\"{{ item.getEntityID() }}\">
{{ item.getAlias() != null ? item.getAlias() : item.getName() }} <span>{{ item.getEntityCount() }}</span>
</a>
</li>
{% endif %}
{% endfor %}
{% if flierCompanyNewsMenuItem %}
{% set item = flierCompanyNewsMenuItem %}
<li>
<a href=\"{{ item.getURL() }}\" {{ item.getEntityID() == currentCategoryID ? 'class=\"active\"'}} data-id=\"{{ item.getEntityID() }}\">
{{ item.getAlias() != null ? item.getAlias() : item.getName() }} <span>{{ item.getEntityCount() }}</span>
</a>
</li>
{% endif %}
{% endif %}
</ul>
<div class=\"clear\"></div>
<div id=\"flierCitySelectBox\">
<div class=\"title\">Выберите свой город</div>
{% apply spaceless %}
<ul id=\"flierFirstLetterCityFilters\">
{% for char in cityList|keys %}
<li><a href=\"#\" data-char=\"{{ char }}\">{{ char }}</a></li>
{% endfor %}
</ul>
<div id=\"flierCitySelectList\">
{% set cityColumnCount = 6 %}
{% set itemInColumnCount = (constant('Slivki\\\\Entity\\\\City::FLIER_DEFAULT_CITY_LIST')|length / cityColumnCount)|round(1, 'ceil') %}
{% for row in constant('Slivki\\\\Entity\\\\City::FLIER_DEFAULT_CITY_LIST')|batch(itemInColumnCount) %}
<ul class=\"char-div\">
{% for defaultCity in row %}
<li class=\"default-city-li {{ selectedCity is defined and selectedCity == defaultCity.name ? 'active' }}\" data-char=\"{{ defaultCity.name|first }}\">
<a href=\"{{ app.request.pathInfo }}?city={{ defaultCity.name|url_encode }}\">{{ defaultCity.name }} <span data-toggle=\"tooltip\" data-placement=\"top\" data-original-title=\"Количество жителей\">{{ defaultCity.population }}</span></a>
</li>
{% endfor %}
</ul>
{% endfor %}
{% set currentChar = cityList|keys|first %}
{% for char in cityList|keys %}
{% set itemInColumnCount = (cityList[char]|length / cityColumnCount)|round(1, 'ceil') %}
<div data-char=\"{{ char }}\" class=\"char-div\">
{% for row in cityList[char]|batch(itemInColumnCount) %}
<ul>
{% for city in row %}
<li {{ selectedCity is defined and selectedCity == city.cityName ? 'class=active' }}>
<a href=\"{{ app.request.pathInfo }}?city={{ city.cityName|url_encode }}\">{{ city.cityName }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</div>
{% endfor %}
</div>
{% endapply %}
</div>
{% include 'Slivki/sale/sale_map.html.twig' %}
{% endif %}
{% block main_content %}
{% if flierMenu is not defined %}
<div class=\"stock-group-header with-search\">
{% if currentCategoryID > 0 %}
{% if isChildOfVideoGuide is defined and isChildOfVideoGuide %}
<div class=\"breadcrumbs\">
<a href=\"{{ base_url }}\">Главная</a>
<i class=\"fa fa-angle-right\"></i><a href=\"{{ getURL(\"Slivki:Sale:category\", videoguideCategory.category.getID()) }}\"> {{ videoguideCategory.category.getName() }}</a>
<i class=\"fa fa-angle-right\"></i> {{ currentCategory.category.getName() }}
</div>
{% elseif currentCategoryID == constant('Slivki\\\\Entity\\\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID') %}
<div class=\"breadcrumbs\">
<a href=\"{{ base_url }}\">Главная</a>
<i class=\"fa fa-angle-right\"></i> {{ currentCategory.category.getName() }}
</div>
{% else %}
<div class=\"breadcrumbs\">
<a href=\"{{ base_url }}\">Главная</a>
<i class=\"fa fa-angle-right\"></i><a href=\"{{ base_url }}/skidki-i-rasprodazhi\"> Новости скидок</a>
{% if parentCategory is defined %}
<i class=\"fa fa-angle-right\"></i><a href=\"{{ getURL(\"Slivki:Sale:category\", parentCategory.category.getID()) }}\"> {{ parentCategory.category.getName() }}</a>
{% endif %}
<i class=\"fa fa-angle-right\"></i> {{ currentCategory.category.getName() }}
</div>
{% endif %}
<div class=\"title\"><h1>{{ currentCategory.category.getName() }}</h1> ({{ currentCategory.entityList is defined ? currentCategory.entityList|length : 0 }})</div>
{% else %}
<div class=\"breadcrumbs\">
<a href=\"{{ base_url }}\">Главная</a>
<i class=\"fa fa-angle-right\"></i> Новости скидок
</div>
<div class=\"clear\"></div>
<div class=\"title-wrap text-center\">
<div class=\"title\"><h1>{{ metaInfo.title }} Новости скидок</h1> ({{ getActiveSalesCount() }})</div>
{% endif %}
{% if not isMobileDevice() %}
<div class=\"flier-total-visit-count\">
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='{{ saleVisitCountTooltip }}'><i class=\"slivki-icon-users\"></i>{{ saleVisitCount }}</span><br>
<span data-toggle=\"tooltip\" data-placement=\"left\" data-original-title='{{ visitedSalesTooltip }}'><i class=\"slivki-icon-paper\"></i>{{ visitedSales }}</span>
</div>
{% endif %}
<div class=\"clear\"></div>
</div>
</div>
{% if isVideoguideCategory is not defined or not isVideoguideCategory %}
{% set saleMenu = saleMenu is defined ? saleMenu : categoryList %}
{% if isMobileDevice() %}
<div id=\"mustBeFixedContainer\">
<div id=\"mustBeFixed\">
{% endif %}
<ul id=\"saleTopMenu\" class=\"capsule-menu pb-2\">
{% for category in saleMenu %}
<li>
<a href=\"{{ getURL(\"Slivki:Sale:category\", category.category.getID()) }}\" {{ category.category.getID() == currentCategoryID ? 'class=\"active\"'}} data-id=\"{{ category.category.getID() }}\">
{{ category.category.getName() }}
{% if statViewer %}
({{ getStatVisitCount(category.category.getID(), constant('Slivki\\\\Entity\\\\Visit::TYPE_SALE_CATEGORY'), yesterday, yesterday) }})
{% endif %}
<span>{{ category.category.getEntityCount() }}</span>
</a>
</li>
{% endfor %}
<li class=\"capsule-menu--collapse-btn\">
<a href=\"javascript:void(0)\" class=\"active\">Свернуть</a>
</li>
<li class=\"capsule-menu--expand-btn\">
<a href=\"javascript:void(0)\"><i class=\"slivki-icon-dot-3\"></i></a>
</li>
</ul>
{% if isMobileDevice() %}
</div>
</div>
{% endif %}
{% endif %}
{% if isVideoguideCategory is defined and isVideoguideCategory %}
{% apply spaceless %}
<div id=\"videoguideCategoryMenu\" class=\"{{ not isMobileDevice() ? 'swiper-container' }}\">
<div class=\"{{ not isMobileDevice() ? 'swiper-wrapper' }}\">
{% for category in videoguideCategoryMenu|filter(category => category.getID() != constant('Slivki\\\\Entity\\\\Category::SALE_VIDEO_GUIDE_AUTORS_CATEGORY_ID')) %}
{% set categoryUrl = getURL(\"Slivki:Sale:category\", category.getID()) %}
<a class=\"{{ not isMobileDevice() ? 'swiper-slide' }} {{ categoryUrl == app.request.pathinfo ? 'active' }}\" href=\"{{ categoryUrl }}\">
<img src=\"{{ getImageURL(category.getHotFeedIconMedia(), 128, 128) }}\" alt=''/>
<br />
{{ category.getName() }}
{% if statViewer %}
({{ getStatVisitCount(category.getID(), constant('Slivki\\\\Entity\\\\Visit::TYPE_SALE_CATEGORY'), yesterday, yesterday) }})
{% endif %}
</a>
{% endfor %}
</div>
<div class=\"swiper-button swiper-button-prev\"></div>
<div class=\"swiper-button swiper-button-next\"></div>
</div>
{% endapply %}
{% endif %}
{% if isVideoguideCategory is not defined or not isVideoguideCategory %}
{% include 'Slivki/sale/sale_map.html.twig' %}
{% endif %}
{% if mainHotFeed is defined and mainHotFeed|length > 0 %}
<div id=\"mainHotFeed\" class=\"sales-hot-feed\">
<div class=\"title\"><i> </i> ГОРЯЧАЯ ЛЕНТА</div>
<div class=\"swiper-container\" id=\"mainHotFeedSlider\" data-offset=\"0\" data-type=\"{{ constant('Slivki\\\\Entity\\\\HotFeed::TYPE_MAIN_PAGE') }}\">
<div class=\"swiper-wrapper\">
{{ mainHotFeed|raw }}
</div>
<div class=\"swiper-button swiper-button-prev\"></div>
<div class=\"swiper-button swiper-button-next\"></div>
</div>
</div>
{% endif %}
{% endif %}
{% block teaserList %}
<div id=\"saleIndexTeasers\">
{% include 'Slivki/sale/sale_list_box.html.twig' with {'noCategoryTitle': isVideoguideCategory is defined and isVideoguideCategory } %}
{% if currentCategoryID == 0 %}
<div id=\"saleCategoryListLoader\"><i class=\"fa fa-spinner fa-spin\" aria-hidden=\"true\"></i></div>
{% endif %}
</div>
{% endblock %}
{% endblock %}
</div>
</div>
</div>
{{ getFooter() }}
{% endblock %}
{% block popups %}
{{ parent() }}
{% include 'Slivki/popups/video_guide_popup.html.twig' %}
{% endblock %}", "Slivki/sale/index.html.twig", "/mnt/data/virtwww/test/templates/Slivki/sale/index.html.twig");
}
}