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