<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Slivki/comments/comments_list.html.twig */
class __TwigTemplate_86d2f328d6ce5ed8dc15a58a9e6da536d71d0c5abfdee3e6d2d2943a6ec2447d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/comments/comments_list.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/comments/comments_list.html.twig"));
// line 1
echo "<div class=\"votes\">
<div class=\"votesBox comments-list\" id=\"addVotesButton\">
<div class=\"votesBoxTitle title d-flex\">
<div class=\"offer-titles\">
<h2>";
// line 5
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
echo "Отзывы ";
if ((isset($context["showCommentsAmount"]) || array_key_exists("showCommentsAmount", $context) ? $context["showCommentsAmount"] : (function () { throw new RuntimeError('Variable "showCommentsAmount" does not exist.', 5, $this->source); })())) {
echo "(";
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", null, true);
echo ")
<r data-html=\"true\"
data-toggle=\"tooltip\"
data-placement=\"top\"
data-original-title=\"Рейтинг компании <br> за 90 дней\">
<span class=\"yellow-span\">★</span>";
// line 10
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", null, true);
echo "
</r>
";
}
}
// line 13
echo " </h2>
</div>
";
// line 15
if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(twig_constant("Slivki\\Entity\\UserGroup::COMMENTS_BANNED_ROLE_NAME"))) {
// line 16
echo " ";
$context["buttonCaption"] = (((0 === 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")))) ? ("Добавить") : ("Добавить отзыв"));
// line 17
echo " <span class=\"addVoteLink\"
id=\"addVoteLink\"
data-oid=\"";
// line 19
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", null, true);
echo "\"
data-type=\"";
// line 20
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", null, true);
echo "\"
data-action=\"comment_add\"
data-toggle=\"modal\"
data-target=\"";
// line 23
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", false, false, false, 23)) ? ("#addVoteBox") : ("#onlyRegistered"));
echo "\">
<img src=\"/images/pencil.svg\" alt=\"Добавить\" class=\"pencil-icon\">";
// line 24
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", null, true);
echo "
</span>
";
}
// line 27
echo " </div>
<p class=\"sf-font mt-5 font-bold font-size-17\">Фотографии пользователей:</p>
</div>
";
// line 30
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 31
echo " ";
if ((0 === 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")))) {
// line 32
echo " ";
$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");
// line 33
echo " ";
$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); })()));
// line 34
echo " ";
if (((0 !== twig_compare((isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 34, $this->source); })()), "")) && (0 !== twig_compare((isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 34, $this->source); })()), "")))) {
// line 35
echo " <ul id=\"commentPhotoTabs\" class=\"nav nav-tabs\" role=\"tablist\">
<li class=\"active single-line\"><a href=\"#commentSupplierPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото работ</a></li>
<li class=\"single-line\"><a href=\"#commentUserPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото из отзывов</a></li>
</ul>
<div class=\"tab-content\">
<div class=\"tab-pane fade\" id=\"commentSupplierPhotoTab\">
";
// line 41
echo (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 41, $this->source); })());
echo "
</div>
<div class=\"tab-pane fade in active\" id=\"commentUserPhotoTab\">
";
// line 44
echo (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 44, $this->source); })());
echo "
</div>
</div>
";
} elseif ((0 !== twig_compare( // line 47
(isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 47, $this->source); })()), ""))) {
// line 48
echo " ";
echo (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 48, $this->source); })());
echo "
";
} elseif ((0 !== twig_compare( // line 49
(isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 49, $this->source); })()), ""))) {
// line 50
echo " ";
echo (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 50, $this->source); })());
echo "
";
}
// line 52
echo " ";
}
// line 53
echo " ";
}
// line 54
echo " <div class=\"userVotes message comments-content\">
";
// line 55
if ((0 === 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))) {
// line 56
echo " <div class=\"comment-banners-block\" data-position=\"no-comments\">
";
// line 57
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->env->getRuntime('Slivki\Twig\GetCommentsBanners')->getCommentsBanners());
foreach ($context['_seq'] as $context["_key"] => $context["banners"]) {
// line 58
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["banners"]);
foreach ($context['_seq'] as $context["_key"] => $context["banner"]) {
// line 59
echo " <div class=\"comment-banner-rotation\">";
echo $context["banner"];
echo "</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['banner'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 61
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['banners'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 62
echo " </div>
";
// line 63
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 64
echo " <div>Будьте первым, кто оставит комментарий к этой акции.</div>
";
}
// line 66
echo " ";
}
// line 67
echo " ";
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); })())) : (""));
echo "
<div><img class=\"ajaxLoader\" src=\"/images/image-preview-ajax-loader.gif\" alt=\"Загрузка...\"></div>
</div>
</div>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Slivki/comments/comments_list.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<div class=\"votes\">
<div class=\"votesBox comments-list\" id=\"addVotesButton\">
<div class=\"votesBoxTitle title d-flex\">
<div class=\"offer-titles\">
<h2>{% if not isMobileDevice() %}Отзывы {% if showCommentsAmount %}({{ commentsAmount }})
<r data-html=\"true\"
data-toggle=\"tooltip\"
data-placement=\"top\"
data-original-title=\"Рейтинг компании <br> за 90 дней\">
<span class=\"yellow-span\">★</span>{{ rating }}
</r>
{% endif %}{% endif %}
</h2>
</div>
{% if (not is_granted(constant('Slivki\\\\Entity\\\\UserGroup::COMMENTS_BANNED_ROLE_NAME'))) %}
{% set buttonCaption = type == constant('Slivki\\\\Entity\\\\Comment::TYPE_MALL_BRAND_COMMENT') ? 'Добавить' : 'Добавить отзыв'%}
<span class=\"addVoteLink\"
id=\"addVoteLink\"
data-oid=\"{{ entityID }}\"
data-type=\"{{ type }}\"
data-action=\"comment_add\"
data-toggle=\"modal\"
data-target=\"{{ app.user ? '#addVoteBox' : '#onlyRegistered' }}\">
<img src=\"/images/pencil.svg\" alt=\"Добавить\" class=\"pencil-icon\">{{ buttonCaption }}
</span>
{% endif %}
</div>
<p class=\"sf-font mt-5 font-bold font-size-17\">Фотографии пользователей:</p>
</div>
{% if not isMobileDevice() %}
{% if (type == constant('Slivki\\\\Entity\\\\Comment::TYPE_OFFER_COMMENT')) %}
{% set userCommentMediaBlock = getUserCommentsMediaBlockByEntityID(entityID, 'offer') %}
{% set offerSupplierPhotoBlock = getSupplierOfferPhotoBlockByOfferID(entityID) %}
{% if userCommentMediaBlock != '' and offerSupplierPhotoBlock != '' %}
<ul id=\"commentPhotoTabs\" class=\"nav nav-tabs\" role=\"tablist\">
<li class=\"active single-line\"><a href=\"#commentSupplierPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото работ</a></li>
<li class=\"single-line\"><a href=\"#commentUserPhotoTab\" role=\"tab\" data-toggle=\"tab\">Фото из отзывов</a></li>
</ul>
<div class=\"tab-content\">
<div class=\"tab-pane fade\" id=\"commentSupplierPhotoTab\">
{{ offerSupplierPhotoBlock|raw }}
</div>
<div class=\"tab-pane fade in active\" id=\"commentUserPhotoTab\">
{{ userCommentMediaBlock|raw }}
</div>
</div>
{% elseif userCommentMediaBlock != '' %}
{{ userCommentMediaBlock|raw }}
{% elseif offerSupplierPhotoBlock != '' %}
{{ offerSupplierPhotoBlock|raw }}
{% endif %}
{% endif %}
{% endif %}
<div class=\"userVotes message comments-content\">
{% if commentsAmount == 0 %}
<div class=\"comment-banners-block\" data-position=\"no-comments\">
{% for banners in getCommentsBanners() %}
{% for banner in banners %}
<div class=\"comment-banner-rotation\">{{ banner|raw }}</div>
{% endfor %}
{% endfor %}
</div>
{% if not isMobileDevice() %}
<div>Будьте первым, кто оставит комментарий к этой акции.</div>
{% endif %}
{% endif %}
{{ comments is defined ? comments|raw }}
<div><img class=\"ajaxLoader\" src=\"/images/image-preview-ajax-loader.gif\" alt=\"Загрузка...\"></div>
</div>
</div>", "Slivki/comments/comments_list.html.twig", "/mnt/data/virtwww/test1/templates/Slivki/comments/comments_list.html.twig");
}
}