var/cache/dev/twig/de/deb33418db33e7e63755b52689cdef972f459d07365d317252461d31a1600303.php line 48

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Slivki/sale/sale.html.twig */
  14. class __TwigTemplate_1c574203c1dbfb019c2520cb96ea28a0fb5030eb802a1e2013a76271e5d89895 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'stylesheets' => [$this'block_stylesheets'],
  24.             'header' => [$this'block_header'],
  25.             'ogimage' => [$this'block_ogimage'],
  26.             'left_sidebar' => [$this'block_left_sidebar'],
  27.             'mainColumnClass' => [$this'block_mainColumnClass'],
  28.             'mainColumnParameters' => [$this'block_mainColumnParameters'],
  29.             'main_content' => [$this'block_main_content'],
  30.             'javascripts' => [$this'block_javascripts'],
  31.             'popups' => [$this'block_popups'],
  32.             'assetsBottom' => [$this'block_assetsBottom'],
  33.             'bottomContentBlock' => [$this'block_bottomContentBlock'],
  34.         ];
  35.     }
  36.     protected function doGetParent(array $context)
  37.     {
  38.         // line 1
  39.         return "base.html.twig";
  40.     }
  41.     protected function doDisplay(array $context, array $blocks = [])
  42.     {
  43.         $macros $this->macros;
  44.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  45.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Slivki/sale/sale.html.twig"));
  46.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  47.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Slivki/sale/sale.html.twig"));
  48.         $this->parent $this->loadTemplate("base.html.twig""Slivki/sale/sale.html.twig"1);
  49.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  50.         
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  52.         
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  54.     }
  55.     // line 3
  56.     public function block_stylesheets($context, array $blocks = [])
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  61.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  63.         // line 4
  64.         echo "    ";
  65.         $this->displayParentBlock("stylesheets"$context$blocks);
  66.         echo "
  67.     <style type=\"text/css\">
  68.         #sidebarShowMore{display:none;}
  69.     </style>
  70.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css\" />
  71. ";
  72.         
  73.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  74.         
  75.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  76.     }
  77.     // line 11
  78.     public function block_header($context, array $blocks = [])
  79.     {
  80.         $macros $this->macros;
  81.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  82.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  83.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  84.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  85.         // line 12
  86.         echo "    ";
  87.         if ($this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  88.             // line 13
  89.             echo "        ";
  90.             $this->loadTemplate("header_sales_mobile.html.twig""Slivki/sale/sale.html.twig"13)->display($context);
  91.             // line 14
  92.             echo "    ";
  93.         } else {
  94.             // line 15
  95.             echo "        ";
  96.             $this->loadTemplate("header_sales.html.twig""Slivki/sale/sale.html.twig"15)->display(twig_array_merge($context, ["withSearch" => true]));
  97.             // line 16
  98.             echo "    ";
  99.         }
  100.         
  101.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  102.         
  103.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  104.     }
  105.     // line 19
  106.     public function block_ogimage($context, array $blocks = [])
  107.     {
  108.         $macros $this->macros;
  109.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  110.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""ogimage"));
  111.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  112.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""ogimage"));
  113.         // line 20
  114.         echo "    <meta property=\"og:image\" content=\"";
  115.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse20), "getSchemeAndHttpHost", [], "method"falsefalsefalse20), "html"nulltrue);
  116.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse20), 338220)), ["%2F" => "/"]), "html"nulltrue);
  117.         echo "\" />
  118.     <meta property=\"og:image:width\" content=\"338\"/>
  119.     <meta property=\"og:image:height\" content=\"220\"/>
  120. ";
  121.         
  122.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  123.         
  124.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  125.     }
  126.     // line 25
  127.     public function block_left_sidebar($context, array $blocks = [])
  128.     {
  129.         $macros $this->macros;
  130.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  131.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""left_sidebar"));
  132.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  133.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""left_sidebar"));
  134.         // line 26
  135.         echo "    ";
  136.         if ( !(isset($context["isFlier"]) || array_key_exists("isFlier"$context) ? $context["isFlier"] : (function () { throw new RuntimeError('Variable "isFlier" does not exist.'26$this->source); })())) {
  137.             // line 27
  138.             echo "        ";
  139.             $this->loadTemplate("left_sidebar.html.twig""Slivki/sale/sale.html.twig"27)->display($context);
  140.             // line 28
  141.             echo "    ";
  142.         }
  143.         
  144.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  145.         
  146.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  147.     }
  148.     // line 31
  149.     public function block_mainColumnClass($context, array $blocks = [])
  150.     {
  151.         $macros $this->macros;
  152.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  153.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainColumnClass"));
  154.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  155.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainColumnClass"));
  156.         // line 32
  157.         echo "    ";
  158.         if ((isset($context["isFlier"]) || array_key_exists("isFlier"$context) ? $context["isFlier"] : (function () { throw new RuntimeError('Variable "isFlier" does not exist.'32$this->source); })())) {
  159.             $this->displayParentBlock("mainColumnClass"$context$blocks);
  160.             echo " one-column";
  161.         } else {
  162.             $this->displayParentBlock("mainColumnClass"$context$blocks);
  163.             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"falsefalsefalse32)) ? (" sale-with-background") : (""));
  164.         }
  165.         
  166.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  167.         
  168.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  169.     }
  170.     // line 35
  171.     public function block_mainColumnParameters($context, array $blocks = [])
  172.     {
  173.         $macros $this->macros;
  174.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  175.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainColumnParameters"));
  176.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  177.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainColumnParameters"));
  178.         // line 36
  179.         echo "    ";
  180.         if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  181.             // line 37
  182.             echo "        ";
  183.             ((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"falsefalsefalse37)) ? (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"falsefalsefalse37)) . ")"), "html"nulltrue))) : (print ("")));
  184.             echo "
  185.     ";
  186.         }
  187.         
  188.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  189.         
  190.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  191.     }
  192.     // line 41
  193.     public function block_main_content($context, array $blocks = [])
  194.     {
  195.         $macros $this->macros;
  196.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  197.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main_content"));
  198.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  199.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main_content"));
  200.         // line 42
  201.         echo "    ";
  202.         if (((isset($context["parentCategoryList"]) || array_key_exists("parentCategoryList"$context) ? $context["parentCategoryList"] : (function () { throw new RuntimeError('Variable "parentCategoryList" does not exist.'42$this->source); })()) && (=== 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"falsefalsefalse42), "")))) {
  203.             // line 43
  204.             echo "        ";
  205.             $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); })())]));
  206.             // line 44
  207.             echo "    ";
  208.         }
  209.         // line 45
  210.         echo "    <div class=\"clearfix\"></div>
  211.     ";
  212.         // line 47
  213.         $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"falsefalsefalse47));
  214.         // line 48
  215.         echo "    <div class=\"saleDetail\">
  216.         ";
  217.         // line 49
  218.         if ((=== 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"falsefalsefalse49), 280659))) {
  219.             // line 50
  220.             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;\">
  221.         ";
  222.         }
  223.         // line 52
  224.         echo "        ";
  225.         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"falsefalsefalse52)) {
  226.             // line 53
  227.             echo "            <div id=\"saleTitleBlock\" class=\"with-share-block\" data-pixel=";
  228.             echo (((=== 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"falsefalsefalse53), 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%") : (""));
  229.             echo ">
  230.                 ";
  231.             // line 54
  232.             $this->loadTemplate("Slivki/share_block.html.twig""Slivki/sale/sale.html.twig"54)->display($context);
  233.             // line 55
  234.             echo "                <img src=\"";
  235.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse55), "html"nulltrue);
  236.             echo "\" />
  237.                 <a href=\"";
  238.             // line 56
  239.             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"nulltrue);
  240.             echo "/am-fotogid\">Фотогиды</a>
  241.                 <h1>
  242.                     ";
  243.             // line 58
  244.             if ((=== 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"falsefalsefalse58), 287031))) {
  245.                 // line 59
  246.                 echo "                        Стань агентом банка! <br> Рекомендуй другу карточку <nobr>«1-2-3»</nobr> и оба получите по <nobr>5 рублей!</nobr>
  247.                     ";
  248.             } else {
  249.                 // line 61
  250.                 echo "                        ";
  251.                 echo twig_escape_filter($this->envtwig_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"falsefalsefalse61), "html"nulltrue);
  252.                 echo "
  253.                     ";
  254.             }
  255.             // line 63
  256.             echo "                </h1>
  257.                 <div>
  258.                     ";
  259.             // line 65
  260.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_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"falsefalsefalse65), "d.m.Y"), "html"nulltrue);
  261.             echo "
  262.                     <i class=\"slivki-icon-eye\"></i>";
  263.             // line 66
  264.             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"nulltrue);
  265.             echo "
  266.                     ";
  267.             // line 67
  268.             if ((=== 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))) {
  269.                 // line 68
  270.                 echo "                        <i class=\"slivki-icon-comment-empty\"></i>";
  271.                 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"nulltrue);
  272.                 echo "
  273.                     ";
  274.             }
  275.             // line 70
  276.             echo "                </div>
  277.             </div>
  278.         ";
  279.         } else {
  280.             // line 73
  281.             echo "            ";
  282.             $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"falsefalsefalse73) * 100) / 5);
  283.             // line 74
  284.             echo "            <div class=\"float-right text-muted\" style=\"margin-left: 5px\">
  285.                 <div class=\"star-ratings-css\">
  286.                     <div class=\"star-ratings-css-top\" style=\"width: ";
  287.             // line 76
  288.             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"nulltrue);
  289.             echo "%\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
  290.                     <div class=\"star-ratings-css-bottom\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
  291.                 </div>
  292.                 (";
  293.             // line 79
  294.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse79), "html"nulltrue);
  295.             echo ")
  296.             </div>
  297.             <div class=\"text-muted float-right\">
  298.                 ";
  299.             // line 82
  300.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_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"falsefalsefalse82), "d.m.Y"), "html"nulltrue);
  301.             echo "
  302.                 <i class=\"slivki-icon-eye\"></i>";
  303.             // line 83
  304.             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"nulltrue);
  305.             echo "
  306.                 ";
  307.             // line 84
  308.             if ((=== 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))) {
  309.                 // line 85
  310.                 echo "                    <i class=\"slivki-icon-comment-empty\"></i>";
  311.                 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"nulltrue);
  312.                 echo "
  313.                 ";
  314.             }
  315.             // line 87
  316.             echo "            </div>
  317.             <div class=\"clear\"></div>
  318.         ";
  319.         }
  320.         // line 90
  321.         echo "
  322.         ";
  323.         // line 91
  324.         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"falsefalsefalse91) && (!== twig_compare(twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse91), "getDescription", [], "method"falsefalsefalse91), "")))) {
  325.             // line 92
  326.             echo "            <div id=\"saleFancyDescriptionBlock\">
  327.                 ";
  328.             // line 93
  329.             echo twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse93), "getDescription", [], "method"falsefalsefalse93);
  330.             echo "
  331.             </div>
  332.             <div id=\"saleCurledPage\"><span>&nbsp;</span><i></i></div>
  333.         ";
  334.         }
  335.         // line 97
  336.         echo "
  337.         <div class=\"saleBody\" data-oid=\"";
  338.         // line 98
  339.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse98), "html"nulltrue);
  340.         echo "\">
  341.             ";
  342.         // line 99
  343.         if ((!== 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"falsefalsefalse99), ""))) {
  344.             // line 100
  345.             echo "                ";
  346.             $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); })())]));
  347.             // line 101
  348.             echo "                <div class=\"clear\"></div>
  349.             ";
  350.         }
  351.         // line 103
  352.         echo "            ";
  353.         echo (isset($context["descriptions"]) || array_key_exists("descriptions"$context) ? $context["descriptions"] : (function () { throw new RuntimeError('Variable "descriptions" does not exist.'103$this->source); })());
  354.         echo "
  355.             ";
  356.         // line 105
  357.         $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"falsefalsefalse105);
  358.         // line 106
  359.         echo "            ";
  360.         if ( !(null === (isset($context["gazurl"]) || array_key_exists("gazurl"$context) ? $context["gazurl"] : (function () { throw new RuntimeError('Variable "gazurl" does not exist.'106$this->source); })()))) {
  361.             // line 107
  362.             echo "                <p><b>Общереспубликанский банк вакансий: </b> <a href=\"";
  363.             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"nulltrue);
  364.             echo "\" rel=\"nofollow\">";
  365.             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"nulltrue);
  366.             echo "</a></p>
  367.             ";
  368.         }
  369.         // line 109
  370.         echo "
  371.             ";
  372.         // line 110
  373.         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"falsefalsefalse110)) {
  374.             // line 111
  375.             echo "                <div id=\"saleGeoLocationData\" data-json=\"";
  376.             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"nulltrue);
  377.             echo "\"></div>
  378.                 <div id=\"saleDetailsMapWrapper\" class=\"category-map-wrapper\">
  379.                     <div id=\"saleDetailsMap\" class=\"category-map\"></div>
  380.                     <div id=\"zoomIn\"></div>
  381.                     <div id=\"zoomOut\"></div>
  382.                     <a id=\"setUserLocationBtn\" href=\"#\" class=\"capsuled\">Указать местоположение</a>
  383.                     <a id=\"mapEnterFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Развернуть</a>
  384.                     <a id=\"mapExitFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Свернуть</a>
  385.                 </div>
  386.             ";
  387.         }
  388.         // line 121
  389.         echo "            <div class=\"saleFooterDetail\">
  390.                 ";
  391.         // line 122
  392.         $this->loadTemplate("Slivki/share_stat.html.twig""Slivki/sale/sale.html.twig"122)->display($context);
  393.         // line 123
  394.         echo "                <div class=\"date\">
  395.                     ";
  396.         // line 124
  397.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_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"falsefalsefalse124), "d.m.Y"), "html"nulltrue);
  398.         echo "
  399.                     <span data-toggle=\"tooltip\" data-placement=\"top\" data-original-title='Просмотров за ";
  400.         // line 125
  401.         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"nulltrue);
  402.         echo " ";
  403.         echo twig_escape_filter($this->env$this->extensions['Slivki\Twig\SlivkiTwigExtension']->pluralFilter([=> "день"=> "дня"=> "дней"], (isset($context["daysFromStart"]) || array_key_exists("daysFromStart"$context) ? $context["daysFromStart"] : (function () { throw new RuntimeError('Variable "daysFromStart" does not exist.'125$this->source); })())), "html"nulltrue);
  404.         echo "'>
  405.                         <i class=\"slivki-icon-eye\"></i>";
  406.         // line 126
  407.         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"nulltrue);
  408.         echo " (";
  409.         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"nulltrue);
  410.         echo " за сутки)
  411.                     </span>
  412.                 </div>
  413.                 ";
  414.         // line 130
  415.         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"falsefalsefalse130)) {
  416.             // line 131
  417.             echo "                    <div class=\"vote-entity-block\">
  418.                         ";
  419.             // line 132
  420.             if ((=== 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))) {
  421.                 // line 133
  422.                 echo "                            <div class=\"vote-pls\">Оцените, пожалуйста, эту статью:</div>
  423.                         ";
  424.             }
  425.             // line 135
  426.             echo "                        <div class=\"your-vote ";
  427.             echo (((=== 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") : (""));
  428.             echo "\">Ваша оценка: <span id=\"yourVote\">";
  429.             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"nulltrue);
  430.             echo "</span></div>
  431.                         ";
  432.             // line 136
  433.             $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"falsefalsefalse136));
  434.             // line 137
  435.             echo "                        ";
  436.             $context["ratingPercentage"] = (((=== 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"falsefalsefalse137) * 100) / 5)));
  437.             // line 138
  438.             echo "                        ";
  439.             ob_start();
  440.             // line 139
  441.             echo "                            <div class=\"star-ratings-css\">
  442.                                 <div class=\"star-ratings-css-top\" style=\"width: ";
  443.             // line 140
  444.             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"nulltrue);
  445.             echo "%\">
  446.                                     ";
  447.             // line 141
  448.             $context['_parent'] = $context;
  449.             $context['_seq'] = twig_ensure_traversable(range(15));
  450.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  451.                 // line 142
  452.                 echo "                                        <span data-id=\"";
  453.                 echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  454.                 echo "\">★</span>
  455.                                     ";
  456.             }
  457.             $_parent $context['_parent'];
  458.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  459.             $context array_intersect_key($context$_parent) + $_parent;
  460.             // line 144
  461.             echo "                                </div>
  462.                                 <div class=\"star-ratings-css-bottom\">
  463.                                     ";
  464.             // line 146
  465.             $context['_parent'] = $context;
  466.             $context['_seq'] = twig_ensure_traversable(range(15));
  467.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  468.                 // line 147
  469.                 echo "                                        <span data-id=\"";
  470.                 echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  471.                 echo "\">☆</span>
  472.                                     ";
  473.             }
  474.             $_parent $context['_parent'];
  475.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  476.             $context array_intersect_key($context$_parent) + $_parent;
  477.             // line 149
  478.             echo "                                </div>
  479.                             </div>
  480.                         ";
  481.             $___internal_parse_0_ = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  482.             // line 138
  483.             echo twig_spaceless($___internal_parse_0_);
  484.             // line 152
  485.             echo "                        <span class=\"vote-avg-rating ";
  486.             echo (((=== 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") : (""));
  487.             echo "\">(<span id=\"avgSaleRating\">";
  488.             echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_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"falsefalsefalse152), 1), "html"nulltrue);
  489.             echo "</span>)</span>
  490.                         <div class=\"total-votes ";
  491.             // line 153
  492.             echo (((=== 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") : (""));
  493.             echo "\">Всего голосов: <span id=\"totalSaleVotesCnt\">";
  494.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse153), "html"nulltrue);
  495.             echo "</span></div>
  496.                     </div>
  497.                 ";
  498.         }
  499.         // line 156
  500.         echo "                <div id=\"readabilityCheckpoint\"></div>
  501.                 ";
  502.         // line 158
  503.         if ((=== 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))) {
  504.             // line 159
  505.             echo "                    <a href=\"javascript:void(0)\" id=\"showSaleCommentsButton\" class=\"button\">Отзывы (";
  506.             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"nulltrue);
  507.             echo ")</a>
  508.                 ";
  509.         } else {
  510.             // line 161
  511.             echo "                    <span class=\"addVoteLink button mb-1\" id=\"addVoteLink\" data-oid=\"";
  512.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse161), "html"nulltrue);
  513.             echo "\" data-type=\"";
  514.             echo twig_escape_filter($this->envtwig_constant("Slivki\\Entity\\Comment::TYPE_SALE_COMMENT"), "html"nulltrue);
  515.             echo "\" data-action=\"comment_add\" data-toggle=\"modal\" data-target=\"";
  516.             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"falsefalsefalse161)) ? ("#addVoteBox") : ("#onlyRegistered"));
  517.             echo "\" >Добавить отзыв</span>
  518.                 ";
  519.         }
  520.         // line 163
  521.         echo "
  522.                 ";
  523.         // line 164
  524.         if (( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice() && (=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse164), "count", [], "method"falsefalsefalse164), 1)))) {
  525.             // line 165
  526.             echo "                    <div id=\"saleHistory\">
  527.                         <a class=\"selected\" href=\"javascript:void(0)\">";
  528.             // line 166
  529.             echo (((isset($context["isFlier"]) || array_key_exists("isFlier"$context) ? $context["isFlier"] : (function () { throw new RuntimeError('Variable "isFlier" does not exist.'166$this->source); })())) ? ("Архив листовок") : ("Архив новости"));
  530.             echo "</a>
  531.                         <span></span>
  532.                         <div id=\"saleHistoryBox\">
  533.                             <div class=\"sale-history-arrow-box sale-history-box\">
  534.                                 ";
  535.             // line 170
  536.             $context['_parent'] = $context;
  537.             $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"falsefalsefalse170));
  538.             foreach ($context['_seq'] as $context["_key"] => $context["version"]) {
  539.                 // line 171
  540.                 echo "                                    <a ";
  541.                 echo (((=== twig_compare(twig_get_attribute($this->env$this->source$context["version"], "getID", [], "method"falsefalsefalse171), 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"falsefalsefalse171)))) ? ("class=active") : (""));
  542.                 echo " href=\"";
  543.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse171), "pathInfo", [], "any"falsefalsefalse171), "html"nulltrue);
  544.                 echo "?version=";
  545.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["version"], "getID", [], "method"falsefalsefalse171), "html"nulltrue);
  546.                 echo "\">";
  547.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["version"], "getName", [], "method"falsefalsefalse171), "html"nulltrue);
  548.                 echo "</a>
  549.                                 ";
  550.             }
  551.             $_parent $context['_parent'];
  552.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['version'], $context['_parent'], $context['loop']);
  553.             $context array_intersect_key($context$_parent) + $_parent;
  554.             // line 173
  555.             echo "                            </div>
  556.                         </div>
  557.                     </div>
  558.                 ";
  559.         }
  560.         // line 177
  561.         echo "
  562.                 ";
  563.         // line 178
  564.         if ((isset($context["director"]) || array_key_exists("director"$context) ? $context["director"] : (function () { throw new RuntimeError('Variable "director" does not exist.'178$this->source); })())) {
  565.             // line 179
  566.             echo "                    <p class=\"director-info\"><span> ";
  567.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse179), "html"nulltrue);
  568.             echo " УНП: ";
  569.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse179), "html"nulltrue);
  570.             echo " </span> </p>
  571.                 ";
  572.         }
  573.         // line 181
  574.         echo "                ";
  575.         $this->loadTemplate("Slivki/subscribe_block.html.twig""Slivki/sale/sale.html.twig"181)->display($context);
  576.         // line 182
  577.         echo "                ";
  578.         $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"falsefalsefalse182)]));
  579.         // line 183
  580.         echo "
  581.                 <div class=\"clear\"></div>
  582.             </div>
  583.         </div>
  584.     </div>
  585.     <input id=\"stock-id\" value=\"";
  586.         // line 188
  587.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse188), "html"nulltrue);
  588.         echo "\">
  589.     <input type=\"hidden\" id=\"saleVersionID\" value=\"";
  590.         // line 189
  591.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse189), "html"nulltrue);
  592.         echo "\">
  593. ";
  594.         
  595.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  596.         
  597.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  598.     }
  599.     // line 192
  600.     public function block_javascripts($context, array $blocks = [])
  601.     {
  602.         $macros $this->macros;
  603.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  604.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  605.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  606.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  607.         // line 193
  608.         echo "    ";
  609.         $this->displayParentBlock("javascripts"$context$blocks);
  610.         echo "
  611.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js\"></script>
  612.     <script src=\"/js/readability.js?v=4\" type=\"text/javascript\"></script>
  613.     <script src=\"//api-maps.yandex.ru/2.1.73/?lang=ru-RU\" type=\"text/javascript\"></script>
  614.     <script type=\"text/javascript\">
  615.         \$(document).ready(function () {
  616.             \$(document).off( \"click\", \"#sidebarShowMoreWrap\");
  617.             ";
  618.         // line 200
  619.         if ((=== 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))) {
  620.             // line 201
  621.             echo "                \$(document).on(\"click\", \"#showSaleCommentsButton\", function() {
  622.                     if (\$('.votes').length) {
  623.                         \$('html,body').animate({scrollTop: \$(\"#saleCommentsBlock\").offset().top - 100}, 'slow');
  624.                         return false;
  625.                     }
  626.                     return false;
  627.                 });
  628.             ";
  629.         }
  630.         // line 209
  631.         echo "            \$.get(\"/get_comment_box/";
  632.         echo twig_escape_filter($this->envtwig_constant("Slivki\\Entity\\Comment::TYPE_SALE_COMMENT"), "html"nulltrue);
  633.         echo "/";
  634.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse209), "html"nulltrue);
  635.         echo "\", function (data) {
  636.                 \$('#saleCommentsBlock').html(data);
  637.                 \$('#saleCommentsBlock').css('visibility', 'visible');
  638.                 initVoteBox(true);
  639.                 initTooltip();
  640.                 proceedComments(";
  641.         // line 214
  642.         ((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"falsefalsefalse214)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse214), "getID", [], "method"falsefalsefalse214), "html"nulltrue))) : (print (0)));
  643.         echo ");
  644.                 uploadPhoto('/comment/image_upload', '/comment/image_remove');
  645.             });
  646.             ";
  647.         // line 217
  648.         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"falsefalsefalse217)) {
  649.             // line 218
  650.             echo "            \$('.vote-entity-block .star-ratings-css span').click(function () {
  651.                 var rating = \$(this).attr('data-id');
  652.                 var starRatingBlock = \$('.vote-entity-block .star-ratings-css');
  653.                 \$('.vote-entity-block .star-ratings-css-top').css('width', rating * 20 + '%');
  654.                 \$.get('/profile/vote_sale/' + ";
  655.             // line 222
  656.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse222), "html"nulltrue);
  657.             echo " + '/' + rating, function (data) {
  658.                     \$('#yourVote').html(rating);
  659.                     \$('#avgSaleRating').html(parseFloat(data.rating).toFixed(1));
  660.                     \$('#totalSaleVotesCnt').html(data.ratingCount);
  661.                     \$('.vote-pls').remove();
  662.                     \$('.vote-avg-rating').removeClass('hidden');
  663.                     \$('.total-votes').removeClass('hidden');
  664.                     \$('.your-vote').removeClass('hidden');
  665.                 });
  666.                 return false;
  667.             });
  668.             ";
  669.         }
  670.         // line 234
  671.         echo "        });
  672.     </script>
  673. ";
  674.         
  675.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  676.         
  677.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  678.     }
  679.     // line 238
  680.     public function block_popups($context, array $blocks = [])
  681.     {
  682.         $macros $this->macros;
  683.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  684.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""popups"));
  685.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  686.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""popups"));
  687.         // line 239
  688.         echo "    ";
  689.         $this->displayParentBlock("popups"$context$blocks);
  690.         echo "
  691.     ";
  692.         // line 240
  693.         if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  694.             // line 241
  695.             echo "        ";
  696.             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"falsefalsefalse241)) {
  697.                 // line 242
  698.                 echo "            ";
  699.                 $this->loadTemplate("Slivki/popups/add_comment_popup.html.twig""Slivki/sale/sale.html.twig"242)->display(twig_array_merge($context, ["id" => "addVoteBox"]));
  700.                 // line 243
  701.                 echo "            ";
  702.                 $this->loadTemplate("Slivki/popups/edit_comment_popup.html.twig""Slivki/sale/sale.html.twig"243)->display(twig_array_merge($context, ["id" => "editVoteBox"]));
  703.                 // line 244
  704.                 echo "        ";
  705.             } else {
  706.                 // line 245
  707.                 echo "            ";
  708.                 $this->loadTemplate("Slivki/popups/comment_only_registered_popup.html.twig""Slivki/sale/sale.html.twig"245)->display(twig_array_merge($context, ["id" => "onlyRegistered"]));
  709.                 // line 246
  710.                 echo "        ";
  711.             }
  712.             // line 247
  713.             echo "    ";
  714.         }
  715.         // line 248
  716.         echo "    ";
  717.         $this->loadTemplate("Slivki/popups/video_guide_popup.html.twig""Slivki/sale/sale.html.twig"248)->display($context);
  718.         
  719.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  720.         
  721.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  722.     }
  723.     // line 250
  724.     public function block_assetsBottom($context, array $blocks = [])
  725.     {
  726.         $macros $this->macros;
  727.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  728.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""assetsBottom"));
  729.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  730.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""assetsBottom"));
  731.         // line 251
  732.         echo "    ";
  733.         $this->displayParentBlock("assetsBottom"$context$blocks);
  734.         echo "
  735.     <script type=\"text/javascript\" src=\"//yastatic.net/share2/share.js\" charset=\"utf-8\"></script>
  736. ";
  737.         
  738.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  739.         
  740.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  741.     }
  742.     // line 255
  743.     public function block_bottomContentBlock($context, array $blocks = [])
  744.     {
  745.         $macros $this->macros;
  746.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  747.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bottomContentBlock"));
  748.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  749.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bottomContentBlock"));
  750.         // line 256
  751.         echo "    <div class=\"clear\"></div>
  752.     <div class=\"after-content-block content\">
  753.         <div class=\"sale-relations-block-list\">
  754.             ";
  755.         // line 259
  756.         ob_start();
  757.         // line 260
  758.         echo "                ";
  759.         $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); })()))]));
  760.         // line 261
  761.         echo "                ";
  762.         $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"falsefalsefalse261)]));
  763.         // line 262
  764.         echo "                ";
  765.         $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"falsefalsefalse262)]));
  766.         // line 263
  767.         echo "            ";
  768.         $___internal_parse_1_ = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  769.         // line 259
  770.         echo twig_spaceless($___internal_parse_1_);
  771.         // line 264
  772.         echo "        </div>
  773.         <div id=\"saleCommentsBlock\" style=\"visibility: hidden\"></div>
  774.     </div>
  775. ";
  776.         
  777.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  778.         
  779.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  780.     }
  781.     public function getTemplateName()
  782.     {
  783.         return "Slivki/sale/sale.html.twig";
  784.     }
  785.     public function isTraitable()
  786.     {
  787.         return false;
  788.     }
  789.     public function getDebugInfo()
  790.     {
  791.         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,);
  792.     }
  793.     public function getSourceContext()
  794.     {
  795.         return new Source("{% extends 'base.html.twig' %}
  796. {% block stylesheets %}
  797.     {{ parent() }}
  798.     <style type=\"text/css\">
  799.         #sidebarShowMore{display:none;}
  800.     </style>
  801.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css\" />
  802. {% endblock %}
  803. {% block header %}
  804.     {% if isMobileDevice() %}
  805.         {% include 'header_sales_mobile.html.twig' %}
  806.     {% else %}
  807.         {% include 'header_sales.html.twig' with {'withSearch': true} %}
  808.     {% endif %}
  809. {% endblock %}
  810. {% block ogimage %}
  811.     <meta property=\"og:image\" content=\"{{ app.request.getSchemeAndHttpHost() }}{{ getImageURL(sale.getIcon(), 338, 220)|url_encode|replace({'%2F': '/'}) }}\" />
  812.     <meta property=\"og:image:width\" content=\"338\"/>
  813.     <meta property=\"og:image:height\" content=\"220\"/>
  814. {% endblock %}
  815. {% block left_sidebar %}
  816.     {% if not isFlier %}
  817.         {% include 'left_sidebar.html.twig' %}
  818.     {% endif %}
  819. {% endblock %}
  820. {% block mainColumnClass %}
  821.     {% if isFlier %}{{ parent() }} one-column{% else %}{{ parent() }}{{ saleVersion.getDescriptionBackgroundUrl() ? ' sale-with-background' }}{% endif %}
  822. {% endblock %}
  823. {% block mainColumnParameters %}
  824.     {% if not isMobileDevice() %}
  825.         {{ saleVersion.getDescriptionBackgroundUrl() ? 'style=background:url(' ~ saleVersion.getDescriptionBackgroundUrl()  ~ ')' }}
  826.     {% endif %}
  827. {% endblock %}
  828. {% block main_content %}
  829.     {% if parentCategoryList and saleVersion.getDescriptionBackgroundUrl() == '' %}
  830.         {% include 'Slivki/breadcrumbs.html.twig' with { 'parentCategoryList': parentCategoryList } only %}
  831.     {% endif %}
  832.     <div class=\"clearfix\"></div>
  833.     {% set ratingWithCount = getEntityRatingWithCount(constant('Slivki\\\\Entity\\\\Category::SALE_CATEGORY_ID'), sale.getID()) %}
  834.     <div class=\"saleDetail\">
  835.         {% if sale.getID() == 280659 %}
  836.             <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;\">
  837.         {% endif %}
  838.         {% if saleVersion.getDescriptionTitleBackgroundUrl() %}
  839.             <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%' }}>
  840.                 {% include 'Slivki/share_block.html.twig' %}
  841.                 <img src=\"{{ saleVersion.getDescriptionTitleBackgroundUrl() }}\" />
  842.                 <a href=\"{{ base_url }}/am-fotogid\">Фотогиды</a>
  843.                 <h1>
  844.                     {% if sale.getID() == 287031  %}
  845.                         Стань агентом банка! <br> Рекомендуй другу карточку <nobr>«1-2-3»</nobr> и оба получите по <nobr>5 рублей!</nobr>
  846.                     {% else %}
  847.                         {{ sale.getTitle() }}
  848.                     {% endif %}
  849.                 </h1>
  850.                 <div>
  851.                     {{ sale.getSince()|date('d.m.Y') }}
  852.                     <i class=\"slivki-icon-eye\"></i>{{ visitCount }}
  853.                     {% if commentsAmount > 5  %}
  854.                         <i class=\"slivki-icon-comment-empty\"></i>{{ commentsAmount }}
  855.                     {% endif %}
  856.                 </div>
  857.             </div>
  858.         {% else %}
  859.             {% set ratingPercentage =  ratingWithCount.rating * 100 / 5 %}
  860.             <div class=\"float-right text-muted\" style=\"margin-left: 5px\">
  861.                 <div class=\"star-ratings-css\">
  862.                     <div class=\"star-ratings-css-top\" style=\"width: {{ ratingPercentage }}%\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
  863.                     <div class=\"star-ratings-css-bottom\"><span>★</span><span>★</span><span>★</span><span>★</span><span>★</span></div>
  864.                 </div>
  865.                 ({{ ratingWithCount.amount }})
  866.             </div>
  867.             <div class=\"text-muted float-right\">
  868.                 {{ sale.getSince()|date('d.m.Y') }}
  869.                 <i class=\"slivki-icon-eye\"></i>{{ visitCount }}
  870.                 {% if commentsAmount > 5  %}
  871.                     <i class=\"slivki-icon-comment-empty\"></i>{{ commentsAmount }}
  872.                 {% endif %}
  873.             </div>
  874.             <div class=\"clear\"></div>
  875.         {% endif %}
  876.         {% if saleVersion.getFancyDescription() and saleVersion.getFancyDescription().getDescription()|raw != '' %}
  877.             <div id=\"saleFancyDescriptionBlock\">
  878.                 {{ saleVersion.getFancyDescription().getDescription()|raw }}
  879.             </div>
  880.             <div id=\"saleCurledPage\"><span>&nbsp;</span><i></i></div>
  881.         {% endif %}
  882.         <div class=\"saleBody\" data-oid=\"{{ sale.getID() }}\">
  883.             {% if saleVersion.getDescriptionBackgroundUrl() != '' %}
  884.                 {% include 'Slivki/breadcrumbs.html.twig' with { 'parentCategoryList': parentCategoryList } only %}
  885.                 <div class=\"clear\"></div>
  886.             {% endif %}
  887.             {{ descriptions|raw }}
  888.             {% set gazurl = sale.getGszurl() %}
  889.             {% if gazurl is not null %}
  890.                 <p><b>Общереспубликанский банк вакансий: </b> <a href=\"{{ gazurl }}\" rel=\"nofollow\">{{ gazurl }}</a></p>
  891.             {% endif %}
  892.             {% if sale.isShowMap() %}
  893.                 <div id=\"saleGeoLocationData\" data-json=\"{{ saleGeoLocationData }}\"></div>
  894.                 <div id=\"saleDetailsMapWrapper\" class=\"category-map-wrapper\">
  895.                     <div id=\"saleDetailsMap\" class=\"category-map\"></div>
  896.                     <div id=\"zoomIn\"></div>
  897.                     <div id=\"zoomOut\"></div>
  898.                     <a id=\"setUserLocationBtn\" href=\"#\" class=\"capsuled\">Указать местоположение</a>
  899.                     <a id=\"mapEnterFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Развернуть</a>
  900.                     <a id=\"mapExitFullscreen\" href=\"#\" class=\"fullscreen-map-button\">Свернуть</a>
  901.                 </div>
  902.             {% endif %}
  903.             <div class=\"saleFooterDetail\">
  904.                 {% include 'Slivki/share_stat.html.twig' %}
  905.                 <div class=\"date\">
  906.                     {{ sale.getSince()|date('d.m.Y') }}
  907.                     <span data-toggle=\"tooltip\" data-placement=\"top\" data-original-title='Просмотров за {{ daysFromStart }} {{ ['день', 'дня', 'дней']|plural(daysFromStart) }}'>
  908.                         <i class=\"slivki-icon-eye\"></i>{{ visitCount }} ({{ dayVisitCount }} за сутки)
  909.                     </span>
  910.                 </div>
  911.                 {% if app.user %}
  912.                     <div class=\"vote-entity-block\">
  913.                         {% if userVote == 0 %}
  914.                             <div class=\"vote-pls\">Оцените, пожалуйста, эту статью:</div>
  915.                         {% endif %}
  916.                         <div class=\"your-vote {{ userVote == 0 ? ' hidden' }}\">Ваша оценка: <span id=\"yourVote\">{{ userVote }}</span></div>
  917.                         {% set ratingWithCount = getEntityRatingWithCount(constant('Slivki\\\\Entity\\\\Category::SALE_CATEGORY_ID'), sale.getID()) %}
  918.                         {% set ratingPercentage =  userVote == 0 ? 0 : ratingWithCount.rating * 100 / 5 %}
  919.                         {% apply spaceless %}
  920.                             <div class=\"star-ratings-css\">
  921.                                 <div class=\"star-ratings-css-top\" style=\"width: {{ ratingPercentage }}%\">
  922.                                     {% for i in 1..5 %}
  923.                                         <span data-id=\"{{ i }}\">★</span>
  924.                                     {% endfor %}
  925.                                 </div>
  926.                                 <div class=\"star-ratings-css-bottom\">
  927.                                     {% for i in 1..5 %}
  928.                                         <span data-id=\"{{ i }}\">☆</span>
  929.                                     {% endfor %}
  930.                                 </div>
  931.                             </div>
  932.                         {% endapply %}
  933.                         <span class=\"vote-avg-rating {{ userVote == 0 ? ' hidden' }}\">(<span id=\"avgSaleRating\">{{ ratingWithCount.rating|number_format(1) }}</span>)</span>
  934.                         <div class=\"total-votes {{ userVote == 0 ? ' hidden' }}\">Всего голосов: <span id=\"totalSaleVotesCnt\">{{ ratingWithCount.ratingCount }}</span></div>
  935.                     </div>
  936.                 {% endif %}
  937.                 <div id=\"readabilityCheckpoint\"></div>
  938.                 {% if commentsAmount > 0 %}
  939.                     <a href=\"javascript:void(0)\" id=\"showSaleCommentsButton\" class=\"button\">Отзывы ({{ commentsAmount }})</a>
  940.                 {% else %}
  941.                     <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>
  942.                 {% endif %}
  943.                 {% if not isMobileDevice() and sale.getVersions().count() > 1 %}
  944.                     <div id=\"saleHistory\">
  945.                         <a class=\"selected\" href=\"javascript:void(0)\">{{ isFlier ? 'Архив листовок' : 'Архив новости' }}</a>
  946.                         <span></span>
  947.                         <div id=\"saleHistoryBox\">
  948.                             <div class=\"sale-history-arrow-box sale-history-box\">
  949.                                 {% for version in sale.getVersions() %}
  950.                                     <a {{ version.getID() == saleVersion.getID() ? 'class=active' }} href=\"{{ app.request.pathInfo }}?version={{ version.getID() }}\">{{ version.getName() }}</a>
  951.                                 {% endfor %}
  952.                             </div>
  953.                         </div>
  954.                     </div>
  955.                 {% endif %}
  956.                 {% if director %}
  957.                     <p class=\"director-info\"><span> {{ director.getLegalEntity()}} УНП: {{ director.getTaxID() }} </span> </p>
  958.                 {% endif %}
  959.                 {% include 'Slivki/subscribe_block.html.twig' %}
  960.                 {% include 'Slivki/breadcrumbs_footer.html.twig' with { 'parentCategoryList': parentCategoryList, 'title': sale.getTitle() } only %}
  961.                 <div class=\"clear\"></div>
  962.             </div>
  963.         </div>
  964.     </div>
  965.     <input id=\"stock-id\" value=\"{{ sale.getID() }}\">
  966.     <input type=\"hidden\" id=\"saleVersionID\" value=\"{{ saleVersion.getID() }}\">
  967. {% endblock %}
  968. {% block javascripts %}
  969.     {{ parent() }}
  970.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js\"></script>
  971.     <script src=\"/js/readability.js?v=4\" type=\"text/javascript\"></script>
  972.     <script src=\"//api-maps.yandex.ru/2.1.73/?lang=ru-RU\" type=\"text/javascript\"></script>
  973.     <script type=\"text/javascript\">
  974.         \$(document).ready(function () {
  975.             \$(document).off( \"click\", \"#sidebarShowMoreWrap\");
  976.             {% if commentsAmount > 0 %}
  977.                 \$(document).on(\"click\", \"#showSaleCommentsButton\", function() {
  978.                     if (\$('.votes').length) {
  979.                         \$('html,body').animate({scrollTop: \$(\"#saleCommentsBlock\").offset().top - 100}, 'slow');
  980.                         return false;
  981.                     }
  982.                     return false;
  983.                 });
  984.             {% endif %}
  985.             \$.get(\"/get_comment_box/{{ constant('Slivki\\\\Entity\\\\Comment::TYPE_SALE_COMMENT') }}/{{ sale.getID() }}\", function (data) {
  986.                 \$('#saleCommentsBlock').html(data);
  987.                 \$('#saleCommentsBlock').css('visibility', 'visible');
  988.                 initVoteBox(true);
  989.                 initTooltip();
  990.                 proceedComments({{ app.user ? app.user.getID() : 0 }});
  991.                 uploadPhoto('/comment/image_upload', '/comment/image_remove');
  992.             });
  993.             {% if app.user %}
  994.             \$('.vote-entity-block .star-ratings-css span').click(function () {
  995.                 var rating = \$(this).attr('data-id');
  996.                 var starRatingBlock = \$('.vote-entity-block .star-ratings-css');
  997.                 \$('.vote-entity-block .star-ratings-css-top').css('width', rating * 20 + '%');
  998.                 \$.get('/profile/vote_sale/' + {{ sale.getID }} + '/' + rating, function (data) {
  999.                     \$('#yourVote').html(rating);
  1000.                     \$('#avgSaleRating').html(parseFloat(data.rating).toFixed(1));
  1001.                     \$('#totalSaleVotesCnt').html(data.ratingCount);
  1002.                     \$('.vote-pls').remove();
  1003.                     \$('.vote-avg-rating').removeClass('hidden');
  1004.                     \$('.total-votes').removeClass('hidden');
  1005.                     \$('.your-vote').removeClass('hidden');
  1006.                 });
  1007.                 return false;
  1008.             });
  1009.             {% endif %}
  1010.         });
  1011.     </script>
  1012. {% endblock %}
  1013. {% block popups %}
  1014.     {{ parent() }}
  1015.     {% if not isMobileDevice() %}
  1016.         {% if app.user %}
  1017.             {% include 'Slivki/popups/add_comment_popup.html.twig' with {'id': 'addVoteBox'} %}
  1018.             {% include 'Slivki/popups/edit_comment_popup.html.twig' with {'id': 'editVoteBox'} %}
  1019.         {% else %}
  1020.             {% include 'Slivki/popups/comment_only_registered_popup.html.twig' with {'id': 'onlyRegistered'} %}
  1021.         {% endif %}
  1022.     {% endif %}
  1023.     {% include 'Slivki/popups/video_guide_popup.html.twig' %}
  1024. {% endblock %}
  1025. {% block assetsBottom %}
  1026.     {{ parent() }}
  1027.     <script type=\"text/javascript\" src=\"//yastatic.net/share2/share.js\" charset=\"utf-8\"></script>
  1028. {% endblock %}
  1029. {% block bottomContentBlock %}
  1030.     <div class=\"clear\"></div>
  1031.     <div class=\"after-content-block content\">
  1032.         <div class=\"sale-relations-block-list\">
  1033.             {% apply spaceless %}
  1034.                 {% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Еще по теме', 'saleList': relatedSales|last} %}
  1035.                 {% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Популярные', 'saleList': relatedSales[constant('Slivki\\\\Repository\\\\SaleRepository::POPULAR_SALE_CATEGORY_ID')] } %}
  1036.                 {% include 'Slivki/sale/sale_relations_block.html.twig' with {'title': 'Смотрите также', 'saleList': relatedSales[constant('Slivki\\\\Entity\\\\Category::SALE_VIDEO_GUIDE_CATEGORY_ID')]} %}
  1037.             {% endapply %}
  1038.         </div>
  1039.         <div id=\"saleCommentsBlock\" style=\"visibility: hidden\"></div>
  1040.     </div>
  1041. {% endblock %}
  1042. ""Slivki/sale/sale.html.twig""/mnt/data/virtwww/dima/templates/Slivki/sale/sale.html.twig");
  1043.     }
  1044. }