<?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/sale.html.twig */
class __TwigTemplate_1c574203c1dbfb019c2520cb96ea28a0fb5030eb802a1e2013a76271e5d89895 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'header' => [$this, 'block_header'],
'ogimage' => [$this, 'block_ogimage'],
'left_sidebar' => [$this, 'block_left_sidebar'],
'mainColumnClass' => [$this, 'block_mainColumnClass'],
'mainColumnParameters' => [$this, 'block_mainColumnParameters'],
'main_content' => [$this, 'block_main_content'],
'javascripts' => [$this, 'block_javascripts'],
'popups' => [$this, 'block_popups'],
'assetsBottom' => [$this, 'block_assetsBottom'],
'bottomContentBlock' => [$this, 'block_bottomContentBlock'],
];
}
protected function doGetParent(array $context)
{
// line 1
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/sale.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/sale.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "Slivki/sale/sale.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
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 4
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
<style type=\"text/css\">
#sidebarShowMore{display:none;}
</style>
<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css\" />
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 11
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 12
echo " ";
if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 13
echo " ";
$this->loadTemplate("header_sales_mobile.html.twig", "Slivki/sale/sale.html.twig", 13)->display($context);
// line 14
echo " ";
} else {
// line 15
echo " ";
$this->loadTemplate("header_sales.html.twig", "Slivki/sale/sale.html.twig", 15)->display(twig_array_merge($context, ["withSearch" => true]));
// line 16
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 19
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 20
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.', 20, $this->source); })()), "request", [], "any", false, false, false, 20), "getSchemeAndHttpHost", [], "method", false, false, false, 20), "html", null, true);
echo twig_escape_filter($this->env, twig_replace_filter(twig_urlencode_filter($this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 20, $this->source); })()), "getIcon", [], "method", false, false, false, 20), 338, 220)), ["%2F" => "/"]), "html", null, true);
echo "\" />
<meta property=\"og:image:width\" content=\"338\"/>
<meta property=\"og:image:height\" content=\"220\"/>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 25
public function block_left_sidebar($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", "left_sidebar"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "left_sidebar"));
// line 26
echo " ";
if ( !(isset($context["isFlier"]) || array_key_exists("isFlier", $context) ? $context["isFlier"] : (function () { throw new RuntimeError('Variable "isFlier" does not exist.', 26, $this->source); })())) {
// line 27
echo " ";
$this->loadTemplate("left_sidebar.html.twig", "Slivki/sale/sale.html.twig", 27)->display($context);
// line 28
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 31
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"));
// line 32
echo " ";
if ((isset($context["isFlier"]) || array_key_exists("isFlier", $context) ? $context["isFlier"] : (function () { throw new RuntimeError('Variable "isFlier" does not exist.', 32, $this->source); })())) {
$this->displayParentBlock("mainColumnClass", $context, $blocks);
echo " one-column";
} else {
$this->displayParentBlock("mainColumnClass", $context, $blocks);
echo ((twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 32, $this->source); })()), "getDescriptionBackgroundUrl", [], "method", false, false, false, 32)) ? (" sale-with-background") : (""));
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 35
public function block_mainColumnParameters($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", "mainColumnParameters"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainColumnParameters"));
// line 36
echo " ";
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 37
echo " ";
((twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 37, $this->source); })()), "getDescriptionBackgroundUrl", [], "method", false, false, false, 37)) ? (print (twig_escape_filter($this->env, (("style=background:url(" . twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 37, $this->source); })()), "getDescriptionBackgroundUrl", [], "method", false, false, false, 37)) . ")"), "html", null, true))) : (print ("")));
echo "
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 41
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 42
echo " ";
if (((isset($context["parentCategoryList"]) || array_key_exists("parentCategoryList", $context) ? $context["parentCategoryList"] : (function () { throw new RuntimeError('Variable "parentCategoryList" does not exist.', 42, $this->source); })()) && (0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 42, $this->source); })()), "getDescriptionBackgroundUrl", [], "method", false, false, false, 42), "")))) {
// line 43
echo " ";
$this->loadTemplate("Slivki/breadcrumbs.html.twig", "Slivki/sale/sale.html.twig", 43)->display(twig_to_array(["parentCategoryList" => (isset($context["parentCategoryList"]) || array_key_exists("parentCategoryList", $context) ? $context["parentCategoryList"] : (function () { throw new RuntimeError('Variable "parentCategoryList" does not exist.', 43, $this->source); })())]));
// line 44
echo " ";
}
// line 45
echo " <div class=\"clearfix\"></div>
";
// line 47
$context["ratingWithCount"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getEntityRatingWithCount(twig_constant("Slivki\\Entity\\Category::SALE_CATEGORY_ID"), twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 47, $this->source); })()), "getID", [], "method", false, false, false, 47));
// line 48
echo " <div class=\"saleDetail\">
";
// line 49
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 49, $this->source); })()), "getID", [], "method", false, false, false, 49), 280659))) {
// line 50
echo " <img height=\"1\" width=\"1\" src=\"https://mc.admetrica.ru/show?cmn_id=10141&plt_id=27346&crv_id=69064&evt_t=render&ad_type=banner&rnd=%system.random%\" style=\"display:none;\">
";
}
// line 52
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 52, $this->source); })()), "getDescriptionTitleBackgroundUrl", [], "method", false, false, false, 52)) {
// line 53
echo " <div id=\"saleTitleBlock\" class=\"with-share-block\" data-pixel=";
echo (((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 53, $this->source); })()), "getID", [], "method", false, false, false, 53), twig_constant("Slivki\\Entity\\Offer::BETERA_SALE_NEWS_ID")))) ? ("https://amc.yandex.ru/show?cmn_id=26372&plt_id=194140&crv_id=464044&evt_t=render&ad_type=banner&rnd=%system.random%") : (""));
echo ">
";
// line 54
$this->loadTemplate("Slivki/share_block.html.twig", "Slivki/sale/sale.html.twig", 54)->display($context);
// line 55
echo " <img src=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 55, $this->source); })()), "getDescriptionTitleBackgroundUrl", [], "method", false, false, false, 55), "html", null, true);
echo "\" />
<a href=\"";
// line 56
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 "/am-fotogid\">Фотогиды</a>
<h1>
";
// line 58
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 58, $this->source); })()), "getID", [], "method", false, false, false, 58), 287031))) {
// line 59
echo " Стань агентом банка! <br> Рекомендуй другу карточку <nobr>«1-2-3»</nobr> и оба получите по <nobr>5 рублей!</nobr>
";
} else {
// line 61
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 61, $this->source); })()), "getTitle", [], "method", false, false, false, 61), "html", null, true);
echo "
";
}
// line 63
echo " </h1>
<div>
";
// line 65
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 65, $this->source); })()), "getSince", [], "method", false, false, false, 65), "d.m.Y"), "html", null, true);
echo "
<i class=\"slivki-icon-eye\"></i>";
// line 66
echo twig_escape_filter($this->env, (isset($context["visitCount"]) || array_key_exists("visitCount", $context) ? $context["visitCount"] : (function () { throw new RuntimeError('Variable "visitCount" does not exist.', 66, $this->source); })()), "html", null, true);
echo "
";
// line 67
if ((1 === twig_compare((isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 67, $this->source); })()), 5))) {
// line 68
echo " <i class=\"slivki-icon-comment-empty\"></i>";
echo twig_escape_filter($this->env, (isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 68, $this->source); })()), "html", null, true);
echo "
";
}
// line 70
echo " </div>
</div>
";
} else {
// line 73
echo " ";
$context["ratingPercentage"] = ((twig_get_attribute($this->env, $this->source, (isset($context["ratingWithCount"]) || array_key_exists("ratingWithCount", $context) ? $context["ratingWithCount"] : (function () { throw new RuntimeError('Variable "ratingWithCount" does not exist.', 73, $this->source); })()), "rating", [], "any", false, false, false, 73) * 100) / 5);
// line 74
echo " <div class=\"float-right text-muted\" style=\"margin-left: 5px\">
<div class=\"star-ratings-css\">
<div class=\"star-ratings-css-top\" style=\"width: ";
// line 76
echo twig_escape_filter($this->env, (isset($context["ratingPercentage"]) || array_key_exists("ratingPercentage", $context) ? $context["ratingPercentage"] : (function () { throw new RuntimeError('Variable "ratingPercentage" does not exist.', 76, $this->source); })()), "html", null, true);
echo "%\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
<div class=\"star-ratings-css-bottom\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
</div>
(";
// line 79
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ratingWithCount"]) || array_key_exists("ratingWithCount", $context) ? $context["ratingWithCount"] : (function () { throw new RuntimeError('Variable "ratingWithCount" does not exist.', 79, $this->source); })()), "amount", [], "any", false, false, false, 79), "html", null, true);
echo ")
</div>
<div class=\"text-muted float-right\">
";
// line 82
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 82, $this->source); })()), "getSince", [], "method", false, false, false, 82), "d.m.Y"), "html", null, true);
echo "
<i class=\"slivki-icon-eye\"></i>";
// line 83
echo twig_escape_filter($this->env, (isset($context["visitCount"]) || array_key_exists("visitCount", $context) ? $context["visitCount"] : (function () { throw new RuntimeError('Variable "visitCount" does not exist.', 83, $this->source); })()), "html", null, true);
echo "
";
// line 84
if ((1 === twig_compare((isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 84, $this->source); })()), 5))) {
// line 85
echo " <i class=\"slivki-icon-comment-empty\"></i>";
echo twig_escape_filter($this->env, (isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 85, $this->source); })()), "html", null, true);
echo "
";
}
// line 87
echo " </div>
<div class=\"clear\"></div>
";
}
// line 90
echo "
";
// line 91
if ((twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 91, $this->source); })()), "getFancyDescription", [], "method", false, false, false, 91) && (0 !== twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 91, $this->source); })()), "getFancyDescription", [], "method", false, false, false, 91), "getDescription", [], "method", false, false, false, 91), "")))) {
// line 92
echo " <div id=\"saleFancyDescriptionBlock\">
";
// line 93
echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 93, $this->source); })()), "getFancyDescription", [], "method", false, false, false, 93), "getDescription", [], "method", false, false, false, 93);
echo "
</div>
<div id=\"saleCurledPage\"><span> </span><i></i></div>
";
}
// line 97
echo "
<div class=\"saleBody\" data-oid=\"";
// line 98
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 98, $this->source); })()), "getID", [], "method", false, false, false, 98), "html", null, true);
echo "\">
";
// line 99
if ((0 !== twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 99, $this->source); })()), "getDescriptionBackgroundUrl", [], "method", false, false, false, 99), ""))) {
// line 100
echo " ";
$this->loadTemplate("Slivki/breadcrumbs.html.twig", "Slivki/sale/sale.html.twig", 100)->display(twig_to_array(["parentCategoryList" => (isset($context["parentCategoryList"]) || array_key_exists("parentCategoryList", $context) ? $context["parentCategoryList"] : (function () { throw new RuntimeError('Variable "parentCategoryList" does not exist.', 100, $this->source); })())]));
// line 101
echo " <div class=\"clear\"></div>
";
}
// line 103
echo " ";
echo (isset($context["descriptions"]) || array_key_exists("descriptions", $context) ? $context["descriptions"] : (function () { throw new RuntimeError('Variable "descriptions" does not exist.', 103, $this->source); })());
echo "
";
// line 105
$context["gazurl"] = twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 105, $this->source); })()), "getGszurl", [], "method", false, false, false, 105);
// line 106
echo " ";
if ( !(null === (isset($context["gazurl"]) || array_key_exists("gazurl", $context) ? $context["gazurl"] : (function () { throw new RuntimeError('Variable "gazurl" does not exist.', 106, $this->source); })()))) {
// line 107
echo " <p><b>Общереспубликанский банк вакансий: </b> <a href=\"";
echo twig_escape_filter($this->env, (isset($context["gazurl"]) || array_key_exists("gazurl", $context) ? $context["gazurl"] : (function () { throw new RuntimeError('Variable "gazurl" does not exist.', 107, $this->source); })()), "html", null, true);
echo "\" rel=\"nofollow\">";
echo twig_escape_filter($this->env, (isset($context["gazurl"]) || array_key_exists("gazurl", $context) ? $context["gazurl"] : (function () { throw new RuntimeError('Variable "gazurl" does not exist.', 107, $this->source); })()), "html", null, true);
echo "</a></p>
";
}
// line 109
echo "
";
// line 110
if (twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 110, $this->source); })()), "isShowMap", [], "method", false, false, false, 110)) {
// line 111
echo " <div id=\"saleGeoLocationData\" data-json=\"";
echo twig_escape_filter($this->env, (isset($context["saleGeoLocationData"]) || array_key_exists("saleGeoLocationData", $context) ? $context["saleGeoLocationData"] : (function () { throw new RuntimeError('Variable "saleGeoLocationData" does not exist.', 111, $this->source); })()), "html", null, true);
echo "\"></div>
<div id=\"saleDetailsMapWrapper\" class=\"category-map-wrapper\">
<div id=\"saleDetailsMap\" class=\"category-map\"></div>
<div id=\"zoomIn\"></div>
<div id=\"zoomOut\"></div>
<a id=\"setUserLocationBtn\" href=\"#\" class=\"capsuled\">Указать местоположение</a>
<a id=\"mapEnterFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Развернуть</a>
<a id=\"mapExitFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Свернуть</a>
</div>
";
}
// line 121
echo " <div class=\"saleFooterDetail\">
";
// line 122
$this->loadTemplate("Slivki/share_stat.html.twig", "Slivki/sale/sale.html.twig", 122)->display($context);
// line 123
echo " <div class=\"date\">
";
// line 124
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 124, $this->source); })()), "getSince", [], "method", false, false, false, 124), "d.m.Y"), "html", null, true);
echo "
<span data-toggle=\"tooltip\" data-placement=\"top\" data-original-title='Просмотров за ";
// line 125
echo twig_escape_filter($this->env, (isset($context["daysFromStart"]) || array_key_exists("daysFromStart", $context) ? $context["daysFromStart"] : (function () { throw new RuntimeError('Variable "daysFromStart" does not exist.', 125, $this->source); })()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->pluralFilter([0 => "день", 1 => "дня", 2 => "дней"], (isset($context["daysFromStart"]) || array_key_exists("daysFromStart", $context) ? $context["daysFromStart"] : (function () { throw new RuntimeError('Variable "daysFromStart" does not exist.', 125, $this->source); })())), "html", null, true);
echo "'>
<i class=\"slivki-icon-eye\"></i>";
// line 126
echo twig_escape_filter($this->env, (isset($context["visitCount"]) || array_key_exists("visitCount", $context) ? $context["visitCount"] : (function () { throw new RuntimeError('Variable "visitCount" does not exist.', 126, $this->source); })()), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, (isset($context["dayVisitCount"]) || array_key_exists("dayVisitCount", $context) ? $context["dayVisitCount"] : (function () { throw new RuntimeError('Variable "dayVisitCount" does not exist.', 126, $this->source); })()), "html", null, true);
echo " за сутки)
</span>
</div>
";
// line 130
if (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.', 130, $this->source); })()), "user", [], "any", false, false, false, 130)) {
// line 131
echo " <div class=\"vote-entity-block\">
";
// line 132
if ((0 === twig_compare((isset($context["userVote"]) || array_key_exists("userVote", $context) ? $context["userVote"] : (function () { throw new RuntimeError('Variable "userVote" does not exist.', 132, $this->source); })()), 0))) {
// line 133
echo " <div class=\"vote-pls\">Оцените, пожалуйста, эту статью:</div>
";
}
// line 135
echo " <div class=\"your-vote ";
echo (((0 === twig_compare((isset($context["userVote"]) || array_key_exists("userVote", $context) ? $context["userVote"] : (function () { throw new RuntimeError('Variable "userVote" does not exist.', 135, $this->source); })()), 0))) ? (" hidden") : (""));
echo "\">Ваша оценка: <span id=\"yourVote\">";
echo twig_escape_filter($this->env, (isset($context["userVote"]) || array_key_exists("userVote", $context) ? $context["userVote"] : (function () { throw new RuntimeError('Variable "userVote" does not exist.', 135, $this->source); })()), "html", null, true);
echo "</span></div>
";
// line 136
$context["ratingWithCount"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getEntityRatingWithCount(twig_constant("Slivki\\Entity\\Category::SALE_CATEGORY_ID"), twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 136, $this->source); })()), "getID", [], "method", false, false, false, 136));
// line 137
echo " ";
$context["ratingPercentage"] = (((0 === twig_compare((isset($context["userVote"]) || array_key_exists("userVote", $context) ? $context["userVote"] : (function () { throw new RuntimeError('Variable "userVote" does not exist.', 137, $this->source); })()), 0))) ? (0) : (((twig_get_attribute($this->env, $this->source, (isset($context["ratingWithCount"]) || array_key_exists("ratingWithCount", $context) ? $context["ratingWithCount"] : (function () { throw new RuntimeError('Variable "ratingWithCount" does not exist.', 137, $this->source); })()), "rating", [], "any", false, false, false, 137) * 100) / 5)));
// line 138
echo " ";
ob_start();
// line 139
echo " <div class=\"star-ratings-css\">
<div class=\"star-ratings-css-top\" style=\"width: ";
// line 140
echo twig_escape_filter($this->env, (isset($context["ratingPercentage"]) || array_key_exists("ratingPercentage", $context) ? $context["ratingPercentage"] : (function () { throw new RuntimeError('Variable "ratingPercentage" does not exist.', 140, $this->source); })()), "html", null, true);
echo "%\">
";
// line 141
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, 5));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 142
echo " <span data-id=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\">★</span>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 144
echo " </div>
<div class=\"star-ratings-css-bottom\">
";
// line 146
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, 5));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 147
echo " <span data-id=\"";
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\">☆</span>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 149
echo " </div>
</div>
";
$___internal_parse_0_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 138
echo twig_spaceless($___internal_parse_0_);
// line 152
echo " <span class=\"vote-avg-rating ";
echo (((0 === twig_compare((isset($context["userVote"]) || array_key_exists("userVote", $context) ? $context["userVote"] : (function () { throw new RuntimeError('Variable "userVote" does not exist.', 152, $this->source); })()), 0))) ? (" hidden") : (""));
echo "\">(<span id=\"avgSaleRating\">";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ratingWithCount"]) || array_key_exists("ratingWithCount", $context) ? $context["ratingWithCount"] : (function () { throw new RuntimeError('Variable "ratingWithCount" does not exist.', 152, $this->source); })()), "rating", [], "any", false, false, false, 152), 1), "html", null, true);
echo "</span>)</span>
<div class=\"total-votes ";
// line 153
echo (((0 === twig_compare((isset($context["userVote"]) || array_key_exists("userVote", $context) ? $context["userVote"] : (function () { throw new RuntimeError('Variable "userVote" does not exist.', 153, $this->source); })()), 0))) ? (" hidden") : (""));
echo "\">Всего голосов: <span id=\"totalSaleVotesCnt\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ratingWithCount"]) || array_key_exists("ratingWithCount", $context) ? $context["ratingWithCount"] : (function () { throw new RuntimeError('Variable "ratingWithCount" does not exist.', 153, $this->source); })()), "ratingCount", [], "any", false, false, false, 153), "html", null, true);
echo "</span></div>
</div>
";
}
// line 156
echo " <div id=\"readabilityCheckpoint\"></div>
";
// line 158
if ((1 === twig_compare((isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 158, $this->source); })()), 0))) {
// line 159
echo " <a href=\"javascript:void(0)\" id=\"showSaleCommentsButton\" class=\"button\">Отзывы (";
echo twig_escape_filter($this->env, (isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 159, $this->source); })()), "html", null, true);
echo ")</a>
";
} else {
// line 161
echo " <span class=\"addVoteLink button mb-1\" id=\"addVoteLink\" data-oid=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 161, $this->source); })()), "getID", [], "method", false, false, false, 161), "html", null, true);
echo "\" data-type=\"";
echo twig_escape_filter($this->env, twig_constant("Slivki\\Entity\\Comment::TYPE_SALE_COMMENT"), "html", null, true);
echo "\" data-action=\"comment_add\" data-toggle=\"modal\" data-target=\"";
echo ((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.', 161, $this->source); })()), "user", [], "any", false, false, false, 161)) ? ("#addVoteBox") : ("#onlyRegistered"));
echo "\" >Добавить отзыв</span>
";
}
// line 163
echo "
";
// line 164
if (( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice() && (1 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 164, $this->source); })()), "getVersions", [], "method", false, false, false, 164), "count", [], "method", false, false, false, 164), 1)))) {
// line 165
echo " <div id=\"saleHistory\">
<a class=\"selected\" href=\"javascript:void(0)\">";
// line 166
echo (((isset($context["isFlier"]) || array_key_exists("isFlier", $context) ? $context["isFlier"] : (function () { throw new RuntimeError('Variable "isFlier" does not exist.', 166, $this->source); })())) ? ("Архив листовок") : ("Архив новости"));
echo "</a>
<span></span>
<div id=\"saleHistoryBox\">
<div class=\"sale-history-arrow-box sale-history-box\">
";
// line 170
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 170, $this->source); })()), "getVersions", [], "method", false, false, false, 170));
foreach ($context['_seq'] as $context["_key"] => $context["version"]) {
// line 171
echo " <a ";
echo (((0 === twig_compare(twig_get_attribute($this->env, $this->source, $context["version"], "getID", [], "method", false, false, false, 171), twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 171, $this->source); })()), "getID", [], "method", false, false, false, 171)))) ? ("class=active") : (""));
echo " href=\"";
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.', 171, $this->source); })()), "request", [], "any", false, false, false, 171), "pathInfo", [], "any", false, false, false, 171), "html", null, true);
echo "?version=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["version"], "getID", [], "method", false, false, false, 171), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["version"], "getName", [], "method", false, false, false, 171), "html", null, true);
echo "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['version'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 173
echo " </div>
</div>
</div>
";
}
// line 177
echo "
";
// line 178
if ((isset($context["director"]) || array_key_exists("director", $context) ? $context["director"] : (function () { throw new RuntimeError('Variable "director" does not exist.', 178, $this->source); })())) {
// line 179
echo " <p class=\"director-info\"><span> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["director"]) || array_key_exists("director", $context) ? $context["director"] : (function () { throw new RuntimeError('Variable "director" does not exist.', 179, $this->source); })()), "getLegalEntity", [], "method", false, false, false, 179), "html", null, true);
echo " УНП: ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["director"]) || array_key_exists("director", $context) ? $context["director"] : (function () { throw new RuntimeError('Variable "director" does not exist.', 179, $this->source); })()), "getTaxID", [], "method", false, false, false, 179), "html", null, true);
echo " </span> </p>
";
}
// line 181
echo " ";
$this->loadTemplate("Slivki/subscribe_block.html.twig", "Slivki/sale/sale.html.twig", 181)->display($context);
// line 182
echo " ";
$this->loadTemplate("Slivki/breadcrumbs_footer.html.twig", "Slivki/sale/sale.html.twig", 182)->display(twig_to_array(["parentCategoryList" => (isset($context["parentCategoryList"]) || array_key_exists("parentCategoryList", $context) ? $context["parentCategoryList"] : (function () { throw new RuntimeError('Variable "parentCategoryList" does not exist.', 182, $this->source); })()), "title" => twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 182, $this->source); })()), "getTitle", [], "method", false, false, false, 182)]));
// line 183
echo "
<div class=\"clear\"></div>
</div>
</div>
</div>
<input id=\"stock-id\" value=\"";
// line 188
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 188, $this->source); })()), "getID", [], "method", false, false, false, 188), "html", null, true);
echo "\">
<input type=\"hidden\" id=\"saleVersionID\" value=\"";
// line 189
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["saleVersion"]) || array_key_exists("saleVersion", $context) ? $context["saleVersion"] : (function () { throw new RuntimeError('Variable "saleVersion" does not exist.', 189, $this->source); })()), "getID", [], "method", false, false, false, 189), "html", null, true);
echo "\">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 192
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 193
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js\"></script>
<script src=\"/js/readability.js?v=4\" type=\"text/javascript\"></script>
<script src=\"//api-maps.yandex.ru/2.1.73/?lang=ru-RU\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
\$(document).ready(function () {
\$(document).off( \"click\", \"#sidebarShowMoreWrap\");
";
// line 200
if ((1 === twig_compare((isset($context["commentsAmount"]) || array_key_exists("commentsAmount", $context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.', 200, $this->source); })()), 0))) {
// line 201
echo " \$(document).on(\"click\", \"#showSaleCommentsButton\", function() {
if (\$('.votes').length) {
\$('html,body').animate({scrollTop: \$(\"#saleCommentsBlock\").offset().top - 100}, 'slow');
return false;
}
return false;
});
";
}
// line 209
echo " \$.get(\"/get_comment_box/";
echo twig_escape_filter($this->env, twig_constant("Slivki\\Entity\\Comment::TYPE_SALE_COMMENT"), "html", null, true);
echo "/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 209, $this->source); })()), "getID", [], "method", false, false, false, 209), "html", null, true);
echo "\", function (data) {
\$('#saleCommentsBlock').html(data);
\$('#saleCommentsBlock').css('visibility', 'visible');
initVoteBox(true);
initTooltip();
proceedComments(";
// line 214
((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.', 214, $this->source); })()), "user", [], "any", false, false, false, 214)) ? (print (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.', 214, $this->source); })()), "user", [], "any", false, false, false, 214), "getID", [], "method", false, false, false, 214), "html", null, true))) : (print (0)));
echo ");
uploadPhoto('/comment/image_upload', '/comment/image_remove');
});
";
// line 217
if (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); })()), "user", [], "any", false, false, false, 217)) {
// line 218
echo " \$('.vote-entity-block .star-ratings-css span').click(function () {
var rating = \$(this).attr('data-id');
var starRatingBlock = \$('.vote-entity-block .star-ratings-css');
\$('.vote-entity-block .star-ratings-css-top').css('width', rating * 20 + '%');
\$.get('/profile/vote_sale/' + ";
// line 222
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sale"]) || array_key_exists("sale", $context) ? $context["sale"] : (function () { throw new RuntimeError('Variable "sale" does not exist.', 222, $this->source); })()), "getID", [], "any", false, false, false, 222), "html", null, true);
echo " + '/' + rating, function (data) {
\$('#yourVote').html(rating);
\$('#avgSaleRating').html(parseFloat(data.rating).toFixed(1));
\$('#totalSaleVotesCnt').html(data.ratingCount);
\$('.vote-pls').remove();
\$('.vote-avg-rating').removeClass('hidden');
\$('.total-votes').removeClass('hidden');
\$('.your-vote').removeClass('hidden');
});
return false;
});
";
}
// line 234
echo " });
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 238
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 239
echo " ";
$this->displayParentBlock("popups", $context, $blocks);
echo "
";
// line 240
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 241
echo " ";
if (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.', 241, $this->source); })()), "user", [], "any", false, false, false, 241)) {
// line 242
echo " ";
$this->loadTemplate("Slivki/popups/add_comment_popup.html.twig", "Slivki/sale/sale.html.twig", 242)->display(twig_array_merge($context, ["id" => "addVoteBox"]));
// line 243
echo " ";
$this->loadTemplate("Slivki/popups/edit_comment_popup.html.twig", "Slivki/sale/sale.html.twig", 243)->display(twig_array_merge($context, ["id" => "editVoteBox"]));
// line 244
echo " ";
} else {
// line 245
echo " ";
$this->loadTemplate("Slivki/popups/comment_only_registered_popup.html.twig", "Slivki/sale/sale.html.twig", 245)->display(twig_array_merge($context, ["id" => "onlyRegistered"]));
// line 246
echo " ";
}
// line 247
echo " ";
}
// line 248
echo " ";
$this->loadTemplate("Slivki/popups/video_guide_popup.html.twig", "Slivki/sale/sale.html.twig", 248)->display($context);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 250
public function block_assetsBottom($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", "assetsBottom"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "assetsBottom"));
// line 251
echo " ";
$this->displayParentBlock("assetsBottom", $context, $blocks);
echo "
<script type=\"text/javascript\" src=\"//yastatic.net/share2/share.js\" charset=\"utf-8\"></script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 255
public function block_bottomContentBlock($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", "bottomContentBlock"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bottomContentBlock"));
// line 256
echo " <div class=\"clear\"></div>
<div class=\"after-content-block content\">
<div class=\"sale-relations-block-list\">
";
// line 259
ob_start();
// line 260
echo " ";
$this->loadTemplate("Slivki/sale/sale_relations_block.html.twig", "Slivki/sale/sale.html.twig", 260)->display(twig_array_merge($context, ["title" => "Еще по теме", "saleList" => twig_last($this->env, (isset($context["relatedSales"]) || array_key_exists("relatedSales", $context) ? $context["relatedSales"] : (function () { throw new RuntimeError('Variable "relatedSales" does not exist.', 260, $this->source); })()))]));
// line 261
echo " ";
$this->loadTemplate("Slivki/sale/sale_relations_block.html.twig", "Slivki/sale/sale.html.twig", 261)->display(twig_array_merge($context, ["title" => "Популярные", "saleList" => twig_get_attribute($this->env, $this->source, (isset($context["relatedSales"]) || array_key_exists("relatedSales", $context) ? $context["relatedSales"] : (function () { throw new RuntimeError('Variable "relatedSales" does not exist.', 261, $this->source); })()), twig_constant("Slivki\\Repository\\SaleRepository::POPULAR_SALE_CATEGORY_ID"), [], "array", false, false, false, 261)]));
// line 262
echo " ";
$this->loadTemplate("Slivki/sale/sale_relations_block.html.twig", "Slivki/sale/sale.html.twig", 262)->display(twig_array_merge($context, ["title" => "Смотрите также", "saleList" => twig_get_attribute($this->env, $this->source, (isset($context["relatedSales"]) || array_key_exists("relatedSales", $context) ? $context["relatedSales"] : (function () { throw new RuntimeError('Variable "relatedSales" does not exist.', 262, $this->source); })()), twig_constant("Slivki\\Entity\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID"), [], "array", false, false, false, 262)]));
// line 263
echo " ";
$___internal_parse_1_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 259
echo twig_spaceless($___internal_parse_1_);
// line 264
echo " </div>
<div id=\"saleCommentsBlock\" style=\"visibility: hidden\"></div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Slivki/sale/sale.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 840 => 264, 838 => 259, 835 => 263, 832 => 262, 829 => 261, 826 => 260, 824 => 259, 819 => 256, 809 => 255, 795 => 251, 785 => 250, 774 => 248, 771 => 247, 768 => 246, 765 => 245, 762 => 244, 759 => 243, 756 => 242, 753 => 241, 751 => 240, 746 => 239, 736 => 238, 724 => 234, 709 => 222, 703 => 218, 701 => 217, 695 => 214, 684 => 209, 674 => 201, 672 => 200, 661 => 193, 651 => 192, 639 => 189, 635 => 188, 628 => 183, 625 => 182, 622 => 181, 614 => 179, 612 => 178, 609 => 177, 603 => 173, 588 => 171, 584 => 170, 577 => 166, 574 => 165, 572 => 164, 569 => 163, 559 => 161, 553 => 159, 551 => 158, 547 => 156, 539 => 153, 532 => 152, 530 => 138, 525 => 149, 516 => 147, 512 => 146, 508 => 144, 499 => 142, 495 => 141, 491 => 140, 488 => 139, 485 => 138, 482 => 137, 480 => 136, 473 => 135, 469 => 133, 467 => 132, 464 => 131, 462 => 130, 453 => 126, 447 => 125, 443 => 124, 440 => 123, 438 => 122, 435 => 121, 421 => 111, 419 => 110, 416 => 109, 408 => 107, 405 => 106, 403 => 105, 397 => 103, 393 => 101, 390 => 100, 388 => 99, 384 => 98, 381 => 97, 374 => 93, 371 => 92, 369 => 91, 366 => 90, 361 => 87, 355 => 85, 353 => 84, 349 => 83, 345 => 82, 339 => 79, 333 => 76, 329 => 74, 326 => 73, 321 => 70, 315 => 68, 313 => 67, 309 => 66, 305 => 65, 301 => 63, 295 => 61, 291 => 59, 289 => 58, 284 => 56, 279 => 55, 277 => 54, 272 => 53, 269 => 52, 265 => 50, 263 => 49, 260 => 48, 258 => 47, 254 => 45, 251 => 44, 248 => 43, 245 => 42, 235 => 41, 221 => 37, 218 => 36, 208 => 35, 191 => 32, 181 => 31, 170 => 28, 167 => 27, 164 => 26, 154 => 25, 138 => 20, 128 => 19, 117 => 16, 114 => 15, 111 => 14, 108 => 13, 105 => 12, 95 => 11, 78 => 4, 68 => 3, 45 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<style type=\"text/css\">
#sidebarShowMore{display:none;}
</style>
<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css\" />
{% endblock %}
{% block header %}
{% if isMobileDevice() %}
{% include 'header_sales_mobile.html.twig' %}
{% else %}
{% include 'header_sales.html.twig' with {'withSearch': true} %}
{% endif %}
{% endblock %}
{% block ogimage %}
<meta property=\"og:image\" content=\"{{ app.request.getSchemeAndHttpHost() }}{{ getImageURL(sale.getIcon(), 338, 220)|url_encode|replace({'%2F': '/'}) }}\" />
<meta property=\"og:image:width\" content=\"338\"/>
<meta property=\"og:image:height\" content=\"220\"/>
{% endblock %}
{% block left_sidebar %}
{% if not isFlier %}
{% include 'left_sidebar.html.twig' %}
{% endif %}
{% endblock %}
{% block mainColumnClass %}
{% if isFlier %}{{ parent() }} one-column{% else %}{{ parent() }}{{ saleVersion.getDescriptionBackgroundUrl() ? ' sale-with-background' }}{% endif %}
{% endblock %}
{% block mainColumnParameters %}
{% if not isMobileDevice() %}
{{ saleVersion.getDescriptionBackgroundUrl() ? 'style=background:url(' ~ saleVersion.getDescriptionBackgroundUrl() ~ ')' }}
{% endif %}
{% endblock %}
{% block main_content %}
{% if parentCategoryList and saleVersion.getDescriptionBackgroundUrl() == '' %}
{% include 'Slivki/breadcrumbs.html.twig' with { 'parentCategoryList': parentCategoryList } only %}
{% endif %}
<div class=\"clearfix\"></div>
{% set ratingWithCount = getEntityRatingWithCount(constant('Slivki\\\\Entity\\\\Category::SALE_CATEGORY_ID'), sale.getID()) %}
<div class=\"saleDetail\">
{% if sale.getID() == 280659 %}
<img height=\"1\" width=\"1\" src=\"https://mc.admetrica.ru/show?cmn_id=10141&plt_id=27346&crv_id=69064&evt_t=render&ad_type=banner&rnd=%system.random%\" style=\"display:none;\">
{% endif %}
{% if saleVersion.getDescriptionTitleBackgroundUrl() %}
<div id=\"saleTitleBlock\" class=\"with-share-block\" data-pixel={{ sale.getID() == constant('Slivki\\\\Entity\\\\Offer::BETERA_SALE_NEWS_ID') ? 'https://amc.yandex.ru/show?cmn_id=26372&plt_id=194140&crv_id=464044&evt_t=render&ad_type=banner&rnd=%system.random%' }}>
{% include 'Slivki/share_block.html.twig' %}
<img src=\"{{ saleVersion.getDescriptionTitleBackgroundUrl() }}\" />
<a href=\"{{ base_url }}/am-fotogid\">Фотогиды</a>
<h1>
{% if sale.getID() == 287031 %}
Стань агентом банка! <br> Рекомендуй другу карточку <nobr>«1-2-3»</nobr> и оба получите по <nobr>5 рублей!</nobr>
{% else %}
{{ sale.getTitle() }}
{% endif %}
</h1>
<div>
{{ sale.getSince()|date('d.m.Y') }}
<i class=\"slivki-icon-eye\"></i>{{ visitCount }}
{% if commentsAmount > 5 %}
<i class=\"slivki-icon-comment-empty\"></i>{{ commentsAmount }}
{% endif %}
</div>
</div>
{% else %}
{% set ratingPercentage = ratingWithCount.rating * 100 / 5 %}
<div class=\"float-right text-muted\" style=\"margin-left: 5px\">
<div class=\"star-ratings-css\">
<div class=\"star-ratings-css-top\" style=\"width: {{ ratingPercentage }}%\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
<div class=\"star-ratings-css-bottom\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
</div>
({{ ratingWithCount.amount }})
</div>
<div class=\"text-muted float-right\">
{{ sale.getSince()|date('d.m.Y') }}
<i class=\"slivki-icon-eye\"></i>{{ visitCount }}
{% if commentsAmount > 5 %}
<i class=\"slivki-icon-comment-empty\"></i>{{ commentsAmount }}
{% endif %}
</div>
<div class=\"clear\"></div>
{% endif %}
{% if saleVersion.getFancyDescription() and saleVersion.getFancyDescription().getDescription()|raw != '' %}
<div id=\"saleFancyDescriptionBlock\">
{{ saleVersion.getFancyDescription().getDescription()|raw }}
</div>
<div id=\"saleCurledPage\"><span> </span><i></i></div>
{% endif %}
<div class=\"saleBody\" data-oid=\"{{ sale.getID() }}\">
{% if saleVersion.getDescriptionBackgroundUrl() != '' %}
{% include 'Slivki/breadcrumbs.html.twig' with { 'parentCategoryList': parentCategoryList } only %}
<div class=\"clear\"></div>
{% endif %}
{{ descriptions|raw }}
{% set gazurl = sale.getGszurl() %}
{% if gazurl is not null %}
<p><b>Общереспубликанский банк вакансий: </b> <a href=\"{{ gazurl }}\" rel=\"nofollow\">{{ gazurl }}</a></p>
{% endif %}
{% if sale.isShowMap() %}
<div id=\"saleGeoLocationData\" data-json=\"{{ saleGeoLocationData }}\"></div>
<div id=\"saleDetailsMapWrapper\" class=\"category-map-wrapper\">
<div id=\"saleDetailsMap\" class=\"category-map\"></div>
<div id=\"zoomIn\"></div>
<div id=\"zoomOut\"></div>
<a id=\"setUserLocationBtn\" href=\"#\" class=\"capsuled\">Указать местоположение</a>
<a id=\"mapEnterFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Развернуть</a>
<a id=\"mapExitFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Свернуть</a>
</div>
{% endif %}
<div class=\"saleFooterDetail\">
{% include 'Slivki/share_stat.html.twig' %}
<div class=\"date\">
{{ sale.getSince()|date('d.m.Y') }}
<span data-toggle=\"tooltip\" data-placement=\"top\" data-original-title='Просмотров за {{ daysFromStart }} {{ ['день', 'дня', 'дней']|plural(daysFromStart) }}'>
<i class=\"slivki-icon-eye\"></i>{{ visitCount }} ({{ dayVisitCount }} за сутки)
</span>
</div>
{% if app.user %}
<div class=\"vote-entity-block\">
{% if userVote == 0 %}
<div class=\"vote-pls\">Оцените, пожалуйста, эту статью:</div>
{% endif %}
<div class=\"your-vote {{ userVote == 0 ? ' hidden' }}\">Ваша оценка: <span id=\"yourVote\">{{ userVote }}</span></div>
{% set ratingWithCount = getEntityRatingWithCount(constant('Slivki\\\\Entity\\\\Category::SALE_CATEGORY_ID'), sale.getID()) %}
{% set ratingPercentage = userVote == 0 ? 0 : ratingWithCount.rating * 100 / 5 %}
{% apply spaceless %}
<div class=\"star-ratings-css\">
<div class=\"star-ratings-css-top\" style=\"width: {{ ratingPercentage }}%\">
{% for i in 1..5 %}
<span data-id=\"{{ i }}\">★</span>
{% endfor %}
</div>
<div class=\"star-ratings-css-bottom\">
{% for i in 1..5 %}
<span data-id=\"{{ i }}\">☆</span>
{% endfor %}
</div>
</div>
{% endapply %}
<span class=\"vote-avg-rating {{ userVote == 0 ? ' hidden' }}\">(<span id=\"avgSaleRating\">{{ ratingWithCount.rating|number_format(1) }}</span>)</span>
<div class=\"total-votes {{ userVote == 0 ? ' hidden' }}\">Всего голосов: <span id=\"totalSaleVotesCnt\">{{ ratingWithCount.ratingCount }}</span></div>
</div>
{% endif %}
<div id=\"readabilityCheckpoint\"></div>
{% if commentsAmount > 0 %}
<a href=\"javascript:void(0)\" id=\"showSaleCommentsButton\" class=\"button\">Отзывы ({{ commentsAmount }})</a>
{% else %}
<span class=\"addVoteLink button mb-1\" id=\"addVoteLink\" data-oid=\"{{ sale.getID() }}\" data-type=\"{{ constant('Slivki\\\\Entity\\\\Comment::TYPE_SALE_COMMENT') }}\" data-action=\"comment_add\" data-toggle=\"modal\" data-target=\"{{ app.user ? '#addVoteBox' : '#onlyRegistered' }}\" >Добавить отзыв</span>
{% endif %}
{% if not isMobileDevice() and sale.getVersions().count() > 1 %}
<div id=\"saleHistory\">
<a class=\"selected\" href=\"javascript:void(0)\">{{ isFlier ? 'Архив листовок' : 'Архив новости' }}</a>
<span></span>
<div id=\"saleHistoryBox\">
<div class=\"sale-history-arrow-box sale-history-box\">
{% for version in sale.getVersions() %}
<a {{ version.getID() == saleVersion.getID() ? 'class=active' }} href=\"{{ app.request.pathInfo }}?version={{ version.getID() }}\">{{ version.getName() }}</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if director %}
<p class=\"director-info\"><span> {{ director.getLegalEntity()}} УНП: {{ director.getTaxID() }} </span> </p>
{% endif %}
{% include 'Slivki/subscribe_block.html.twig' %}
{% include 'Slivki/breadcrumbs_footer.html.twig' with { 'parentCategoryList': parentCategoryList, 'title': sale.getTitle() } only %}
<div class=\"clear\"></div>
</div>
</div>
</div>
<input id=\"stock-id\" value=\"{{ sale.getID() }}\">
<input type=\"hidden\" id=\"saleVersionID\" value=\"{{ saleVersion.getID() }}\">
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js\"></script>
<script src=\"/js/readability.js?v=4\" type=\"text/javascript\"></script>
<script src=\"//api-maps.yandex.ru/2.1.73/?lang=ru-RU\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
\$(document).ready(function () {
\$(document).off( \"click\", \"#sidebarShowMoreWrap\");
{% if commentsAmount > 0 %}
\$(document).on(\"click\", \"#showSaleCommentsButton\", function() {
if (\$('.votes').length) {
\$('html,body').animate({scrollTop: \$(\"#saleCommentsBlock\").offset().top - 100}, 'slow');
return false;
}
return false;
});
{% endif %}
\$.get(\"/get_comment_box/{{ constant('Slivki\\\\Entity\\\\Comment::TYPE_SALE_COMMENT') }}/{{ sale.getID() }}\", function (data) {
\$('#saleCommentsBlock').html(data);
\$('#saleCommentsBlock').css('visibility', 'visible');
initVoteBox(true);
initTooltip();
proceedComments({{ app.user ? app.user.getID() : 0 }});
uploadPhoto('/comment/image_upload', '/comment/image_remove');
});
{% if app.user %}
\$('.vote-entity-block .star-ratings-css span').click(function () {
var rating = \$(this).attr('data-id');
var starRatingBlock = \$('.vote-entity-block .star-ratings-css');
\$('.vote-entity-block .star-ratings-css-top').css('width', rating * 20 + '%');
\$.get('/profile/vote_sale/' + {{ sale.getID }} + '/' + rating, function (data) {
\$('#yourVote').html(rating);
\$('#avgSaleRating').html(parseFloat(data.rating).toFixed(1));
\$('#totalSaleVotesCnt').html(data.ratingCount);
\$('.vote-pls').remove();
\$('.vote-avg-rating').removeClass('hidden');
\$('.total-votes').removeClass('hidden');
\$('.your-vote').removeClass('hidden');
});
return false;
});
{% endif %}
});
</script>
{% endblock %}
{% block popups %}
{{ parent() }}
{% if not isMobileDevice() %}
{% if app.user %}
{% include 'Slivki/popups/add_comment_popup.html.twig' with {'id': 'addVoteBox'} %}
{% include 'Slivki/popups/edit_comment_popup.html.twig' with {'id': 'editVoteBox'} %}
{% else %}
{% include 'Slivki/popups/comment_only_registered_popup.html.twig' with {'id': 'onlyRegistered'} %}
{% endif %}
{% endif %}
{% include 'Slivki/popups/video_guide_popup.html.twig' %}
{% endblock %}
{% block assetsBottom %}
{{ parent() }}
<script type=\"text/javascript\" src=\"//yastatic.net/share2/share.js\" charset=\"utf-8\"></script>
{% endblock %}
{% block bottomContentBlock %}
<div class=\"clear\"></div>
<div class=\"after-content-block content\">
<div class=\"sale-relations-block-list\">
{% apply spaceless %}
{% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Еще по теме', 'saleList': relatedSales|last} %}
{% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Популярные', 'saleList': relatedSales[constant('Slivki\\\\Repository\\\\SaleRepository::POPULAR_SALE_CATEGORY_ID')] } %}
{% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Смотрите также', 'saleList': relatedSales[constant('Slivki\\\\Entity\\\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID')]} %}
{% endapply %}
</div>
<div id=\"saleCommentsBlock\" style=\"visibility: hidden\"></div>
</div>
{% endblock %}
", "Slivki/sale/sale.html.twig", "/mnt/data/virtwww/dima/templates/Slivki/sale/sale.html.twig");
}
}