var/cache/dev/twig/da/da41391a93186d60b6ba42b7e34606fbf1634989618a855be7c5d1f29c3cdee8.php line 33

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/comments/comments_list.html.twig */
  14. class __TwigTemplate_86d2f328d6ce5ed8dc15a58a9e6da536d71d0c5abfdee3e6d2d2943a6ec2447d 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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Slivki/comments/comments_list.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Slivki/comments/comments_list.html.twig"));
  33.         // line 1
  34.         echo "<div class=\"votes\">
  35.     <div class=\"votesBox comments-list\" id=\"addVotesButton\">
  36.         <div class=\"votesBoxTitle title d-flex\">
  37.             <div class=\"offer-titles\">
  38.                 <h2>";
  39.         // line 5
  40.         if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  41.             echo "Отзывы ";
  42.             if ((isset($context["showCommentsAmount"]) || array_key_exists("showCommentsAmount"$context) ? $context["showCommentsAmount"] : (function () { throw new RuntimeError('Variable "showCommentsAmount" does not exist.'5$this->source); })())) {
  43.                 echo "(";
  44.                 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.'5$this->source); })()), "html"nulltrue);
  45.                 echo ")
  46.                         <r data-html=\"true\"
  47.                            data-toggle=\"tooltip\"
  48.                            data-placement=\"top\"
  49.                            data-original-title=\"Рейтинг компании <br> за 90 дней\">
  50.                             <span class=\"yellow-span\">★</span>";
  51.                 // line 10
  52.                 echo twig_escape_filter($this->env, (isset($context["rating"]) || array_key_exists("rating"$context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.'10$this->source); })()), "html"nulltrue);
  53.                 echo "
  54.                         </r>
  55.                     ";
  56.             }
  57.         }
  58.         // line 13
  59.         echo "                </h2>
  60.             </div>
  61.             ";
  62.         // line 15
  63.         if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(twig_constant("Slivki\\Entity\\UserGroup::COMMENTS_BANNED_ROLE_NAME"))) {
  64.             // line 16
  65.             echo "                ";
  66.             $context["buttonCaption"] = (((=== twig_compare((isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'16$this->source); })()), twig_constant("Slivki\\Entity\\Comment::TYPE_MALL_BRAND_COMMENT")))) ? ("Добавить") : ("Добавить отзыв"));
  67.             // line 17
  68.             echo "                <span class=\"addVoteLink\"
  69.                       id=\"addVoteLink\"
  70.                       data-oid=\"";
  71.             // line 19
  72.             echo twig_escape_filter($this->env, (isset($context["entityID"]) || array_key_exists("entityID"$context) ? $context["entityID"] : (function () { throw new RuntimeError('Variable "entityID" does not exist.'19$this->source); })()), "html"nulltrue);
  73.             echo "\"
  74.                       data-type=\"";
  75.             // line 20
  76.             echo twig_escape_filter($this->env, (isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'20$this->source); })()), "html"nulltrue);
  77.             echo "\"
  78.                       data-action=\"comment_add\"
  79.                       data-toggle=\"modal\"
  80.                       data-target=\"";
  81.             // line 23
  82.             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.'23$this->source); })()), "user", [], "any"falsefalsefalse23)) ? ("#addVoteBox") : ("#onlyRegistered"));
  83.             echo "\">
  84.                     <img src=\"/images/pencil.svg\" alt=\"Добавить\" class=\"pencil-icon\">";
  85.             // line 24
  86.             echo twig_escape_filter($this->env, (isset($context["buttonCaption"]) || array_key_exists("buttonCaption"$context) ? $context["buttonCaption"] : (function () { throw new RuntimeError('Variable "buttonCaption" does not exist.'24$this->source); })()), "html"nulltrue);
  87.             echo "
  88.                 </span>
  89.             ";
  90.         }
  91.         // line 27
  92.         echo "        </div>
  93.         <p class=\"sf-font mt-5 font-bold font-size-17\">Фотографии пользователей:</p>
  94.     </div>
  95.     ";
  96.         // line 30
  97.         if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  98.             // line 31
  99.             echo "        ";
  100.             if ((=== twig_compare((isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'31$this->source); })()), twig_constant("Slivki\\Entity\\Comment::TYPE_OFFER_COMMENT")))) {
  101.                 // line 32
  102.                 echo "            ";
  103.                 $context["userCommentMediaBlock"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getUserCommentsMediaBlockByEntityID($this->env, (isset($context["entityID"]) || array_key_exists("entityID"$context) ? $context["entityID"] : (function () { throw new RuntimeError('Variable "entityID" does not exist.'32$this->source); })()), "offer");
  104.                 // line 33
  105.                 echo "            ";
  106.                 $context["offerSupplierPhotoBlock"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getSupplierOfferPhotoBlockByOfferID($this->env, (isset($context["entityID"]) || array_key_exists("entityID"$context) ? $context["entityID"] : (function () { throw new RuntimeError('Variable "entityID" does not exist.'33$this->source); })()));
  107.                 // line 34
  108.                 echo "            ";
  109.                 if (((!== twig_compare((isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock"$context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.'34$this->source); })()), "")) && (!== twig_compare((isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock"$context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.'34$this->source); })()), "")))) {
  110.                     // line 35
  111.                     echo "                <ul id=\"commentPhotoTabs\" class=\"nav nav-tabs\" role=\"tablist\">
  112.                     <li class=\"active single-line\"><a href=\"#commentSupplierPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото работ</a></li>
  113.                     <li class=\"single-line\"><a href=\"#commentUserPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото из отзывов</a></li>
  114.                 </ul>
  115.                 <div class=\"tab-content\">
  116.                     <div class=\"tab-pane fade\" id=\"commentSupplierPhotoTab\">
  117.                         ";
  118.                     // line 41
  119.                     echo (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock"$context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.'41$this->source); })());
  120.                     echo "
  121.                     </div>
  122.                     <div class=\"tab-pane fade in active\" id=\"commentUserPhotoTab\">
  123.                         ";
  124.                     // line 44
  125.                     echo (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock"$context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.'44$this->source); })());
  126.                     echo "
  127.                     </div>
  128.                 </div>
  129.             ";
  130.                 } elseif ((!== twig_compare(                // line 47
  131. (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock"$context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.'47$this->source); })()), ""))) {
  132.                     // line 48
  133.                     echo "                ";
  134.                     echo (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock"$context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.'48$this->source); })());
  135.                     echo "
  136.             ";
  137.                 } elseif ((!== twig_compare(                // line 49
  138. (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock"$context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.'49$this->source); })()), ""))) {
  139.                     // line 50
  140.                     echo "                ";
  141.                     echo (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock"$context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.'50$this->source); })());
  142.                     echo "
  143.             ";
  144.                 }
  145.                 // line 52
  146.                 echo "        ";
  147.             }
  148.             // line 53
  149.             echo "    ";
  150.         }
  151.         // line 54
  152.         echo "    <div class=\"userVotes message comments-content\">
  153.         ";
  154.         // line 55
  155.         if ((=== twig_compare((isset($context["commentsAmount"]) || array_key_exists("commentsAmount"$context) ? $context["commentsAmount"] : (function () { throw new RuntimeError('Variable "commentsAmount" does not exist.'55$this->source); })()), 0))) {
  156.             // line 56
  157.             echo "            <div class=\"comment-banners-block\" data-position=\"no-comments\">
  158.                 ";
  159.             // line 57
  160.             $context['_parent'] = $context;
  161.             $context['_seq'] = twig_ensure_traversable($this->env->getRuntime('Slivki\Twig\GetCommentsBanners')->getCommentsBanners());
  162.             foreach ($context['_seq'] as $context["_key"] => $context["banners"]) {
  163.                 // line 58
  164.                 echo "                    ";
  165.                 $context['_parent'] = $context;
  166.                 $context['_seq'] = twig_ensure_traversable($context["banners"]);
  167.                 foreach ($context['_seq'] as $context["_key"] => $context["banner"]) {
  168.                     // line 59
  169.                     echo "                        <div class=\"comment-banner-rotation\">";
  170.                     echo $context["banner"];
  171.                     echo "</div>
  172.                     ";
  173.                 }
  174.                 $_parent $context['_parent'];
  175.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['banner'], $context['_parent'], $context['loop']);
  176.                 $context array_intersect_key($context$_parent) + $_parent;
  177.                 // line 61
  178.                 echo "                ";
  179.             }
  180.             $_parent $context['_parent'];
  181.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['banners'], $context['_parent'], $context['loop']);
  182.             $context array_intersect_key($context$_parent) + $_parent;
  183.             // line 62
  184.             echo "            </div>
  185.             ";
  186.             // line 63
  187.             if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
  188.                 // line 64
  189.                 echo "                <div>Будьте первым, кто оставит комментарий к этой акции.</div>
  190.             ";
  191.             }
  192.             // line 66
  193.             echo "        ";
  194.         }
  195.         // line 67
  196.         echo "        ";
  197.         echo ((array_key_exists("comments"$context)) ? ((isset($context["comments"]) || array_key_exists("comments"$context) ? $context["comments"] : (function () { throw new RuntimeError('Variable "comments" does not exist.'67$this->source); })())) : (""));
  198.         echo "
  199.         <div><img class=\"ajaxLoader\" src=\"/images/image-preview-ajax-loader.gif\" alt=\"Загрузка...\"></div>
  200.     </div>
  201. </div>";
  202.         
  203.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  204.         
  205.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  206.     }
  207.     public function getTemplateName()
  208.     {
  209.         return "Slivki/comments/comments_list.html.twig";
  210.     }
  211.     public function isTraitable()
  212.     {
  213.         return false;
  214.     }
  215.     public function getDebugInfo()
  216.     {
  217.         return array (  205 => 67,  202 => 66,  198 => 64,  196 => 63,  193 => 62,  187 => 61,  178 => 59,  173 => 58,  169 => 57,  166 => 56,  164 => 55,  161 => 54,  158 => 53,  155 => 52,  149 => 50,  147 => 49,  142 => 48,  140 => 47,  134 => 44,  128 => 41,  120 => 35,  117 => 34,  114 => 33,  111 => 32,  108 => 31,  106 => 30,  101 => 27,  95 => 24,  91 => 23,  85 => 20,  81 => 19,  77 => 17,  74 => 16,  72 => 15,  68 => 13,  61 => 10,  49 => 5,  43 => 1,);
  218.     }
  219.     public function getSourceContext()
  220.     {
  221.         return new Source("<div class=\"votes\">
  222.     <div class=\"votesBox comments-list\" id=\"addVotesButton\">
  223.         <div class=\"votesBoxTitle title d-flex\">
  224.             <div class=\"offer-titles\">
  225.                 <h2>{% if not isMobileDevice() %}Отзывы {% if showCommentsAmount %}({{ commentsAmount }})
  226.                         <r data-html=\"true\"
  227.                            data-toggle=\"tooltip\"
  228.                            data-placement=\"top\"
  229.                            data-original-title=\"Рейтинг компании <br> за 90 дней\">
  230.                             <span class=\"yellow-span\">★</span>{{ rating }}
  231.                         </r>
  232.                     {% endif %}{% endif %}
  233.                 </h2>
  234.             </div>
  235.             {% if (not is_granted(constant('Slivki\\\\Entity\\\\UserGroup::COMMENTS_BANNED_ROLE_NAME'))) %}
  236.                 {% set buttonCaption = type == constant('Slivki\\\\Entity\\\\Comment::TYPE_MALL_BRAND_COMMENT') ? 'Добавить' : 'Добавить отзыв'%}
  237.                 <span class=\"addVoteLink\"
  238.                       id=\"addVoteLink\"
  239.                       data-oid=\"{{ entityID }}\"
  240.                       data-type=\"{{ type }}\"
  241.                       data-action=\"comment_add\"
  242.                       data-toggle=\"modal\"
  243.                       data-target=\"{{ app.user ? '#addVoteBox' : '#onlyRegistered' }}\">
  244.                     <img src=\"/images/pencil.svg\" alt=\"Добавить\" class=\"pencil-icon\">{{ buttonCaption }}
  245.                 </span>
  246.             {% endif %}
  247.         </div>
  248.         <p class=\"sf-font mt-5 font-bold font-size-17\">Фотографии пользователей:</p>
  249.     </div>
  250.     {% if not isMobileDevice() %}
  251.         {% if (type == constant('Slivki\\\\Entity\\\\Comment::TYPE_OFFER_COMMENT')) %}
  252.             {% set userCommentMediaBlock = getUserCommentsMediaBlockByEntityID(entityID, 'offer') %}
  253.             {% set offerSupplierPhotoBlock = getSupplierOfferPhotoBlockByOfferID(entityID) %}
  254.             {% if userCommentMediaBlock != '' and offerSupplierPhotoBlock != '' %}
  255.                 <ul id=\"commentPhotoTabs\" class=\"nav nav-tabs\" role=\"tablist\">
  256.                     <li class=\"active single-line\"><a href=\"#commentSupplierPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото работ</a></li>
  257.                     <li class=\"single-line\"><a href=\"#commentUserPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото из отзывов</a></li>
  258.                 </ul>
  259.                 <div class=\"tab-content\">
  260.                     <div class=\"tab-pane fade\" id=\"commentSupplierPhotoTab\">
  261.                         {{ offerSupplierPhotoBlock|raw }}
  262.                     </div>
  263.                     <div class=\"tab-pane fade in active\" id=\"commentUserPhotoTab\">
  264.                         {{ userCommentMediaBlock|raw }}
  265.                     </div>
  266.                 </div>
  267.             {% elseif userCommentMediaBlock != '' %}
  268.                 {{ userCommentMediaBlock|raw }}
  269.             {% elseif offerSupplierPhotoBlock != '' %}
  270.                 {{ offerSupplierPhotoBlock|raw }}
  271.             {% endif %}
  272.         {% endif %}
  273.     {% endif %}
  274.     <div class=\"userVotes message comments-content\">
  275.         {% if commentsAmount == 0  %}
  276.             <div class=\"comment-banners-block\" data-position=\"no-comments\">
  277.                 {% for banners in getCommentsBanners() %}
  278.                     {% for banner in banners %}
  279.                         <div class=\"comment-banner-rotation\">{{ banner|raw }}</div>
  280.                     {% endfor %}
  281.                 {% endfor %}
  282.             </div>
  283.             {% if not isMobileDevice() %}
  284.                 <div>Будьте первым, кто оставит комментарий к этой акции.</div>
  285.             {% endif %}
  286.         {% endif %}
  287.         {{ comments is defined ? comments|raw }}
  288.         <div><img class=\"ajaxLoader\" src=\"/images/image-preview-ajax-loader.gif\" alt=\"Загрузка...\"></div>
  289.     </div>
  290. </div>""Slivki/comments/comments_list.html.twig""/mnt/data/virtwww/test1/templates/Slivki/comments/comments_list.html.twig");
  291.     }
  292. }