<?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()) {
// line 6
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 12
if ((isset($context["showCommentsAmount"]) || array_key_exists("showCommentsAmount", $context) ? $context["showCommentsAmount"] : (function () { throw new RuntimeError('Variable "showCommentsAmount" does not exist.', 12, $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.', 12, $this->source); })()), "html", null, true);
echo ")
";
}
}
// line 14
echo " </h2>
</div>
";
// line 16
if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(twig_constant("Slivki\\Entity\\UserGroup::COMMENTS_BANNED_ROLE_NAME"))) {
// line 17
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.', 17, $this->source); })()), twig_constant("Slivki\\Entity\\Comment::TYPE_MALL_BRAND_COMMENT")))) ? ("Добавить") : ("Добавить отзыв"));
// line 18
echo " <span class=\"addVoteLink\"
id=\"addVoteLink\"
data-oid=\"";
// line 20
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", null, true);
echo "\"
data-type=\"";
// line 21
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", null, true);
echo "\"
data-action=\"comment_add\"
data-toggle=\"modal\"
data-target=\"";
// line 24
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", false, false, false, 24)) ? ("#addVoteBox") : ("#onlyRegistered"));
echo "\">
<img src=\"/images/pencil.svg\" alt=\"Добавить\" class=\"pencil-icon\">";
// line 25
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", null, true);
echo "
</span>
";
}
// line 28
echo " </div>
<p class=\"sf-font mt-5 font-bold font-size-17\">Фотографии пользователей:</p>
</div>
";
// line 31
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 32
echo " ";
if ((0 === 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")))) {
// line 33
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.', 33, $this->source); })()), "offer");
// line 34
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.', 34, $this->source); })()));
// line 35
echo " ";
if (((0 !== twig_compare((isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 35, $this->source); })()), "")) && (0 !== twig_compare((isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 35, $this->source); })()), "")))) {
// line 36
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 42
echo (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 42, $this->source); })());
echo "
</div>
<div class=\"tab-pane fade in active\" id=\"commentUserPhotoTab\">
";
// line 45
echo (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 45, $this->source); })());
echo "
</div>
</div>
";
} elseif ((0 !== twig_compare( // line 48
(isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 48, $this->source); })()), ""))) {
// line 49
echo " ";
echo (isset($context["userCommentMediaBlock"]) || array_key_exists("userCommentMediaBlock", $context) ? $context["userCommentMediaBlock"] : (function () { throw new RuntimeError('Variable "userCommentMediaBlock" does not exist.', 49, $this->source); })());
echo "
";
} elseif ((0 !== twig_compare( // line 50
(isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 50, $this->source); })()), ""))) {
// line 51
echo " ";
echo (isset($context["offerSupplierPhotoBlock"]) || array_key_exists("offerSupplierPhotoBlock", $context) ? $context["offerSupplierPhotoBlock"] : (function () { throw new RuntimeError('Variable "offerSupplierPhotoBlock" does not exist.', 51, $this->source); })());
echo "
";
}
// line 53
echo " ";
}
// line 54
echo " ";
}
// line 55
echo " <div class=\"userVotes message comments-content\">
";
// line 56
if ((0 === 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))) {
// line 57
echo " <div class=\"comment-banners-block\" data-position=\"no-comments\">
";
// line 58
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->env->getRuntime('Slivki\Twig\GetCommentsBanners')->getCommentsBanners());
foreach ($context['_seq'] as $context["_key"] => $context["banners"]) {
// line 59
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["banners"]);
foreach ($context['_seq'] as $context["_key"] => $context["banner"]) {
// line 60
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 62
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 63
echo " </div>
";
// line 64
if ( !$this->extensions['Slivki\Twig\SlivkiTwigExtension']->isMobileDevice()) {
// line 65
echo " <div>Будьте первым, кто оставит комментарий к этой акции.</div>
";
}
// line 67
echo " ";
}
// line 68
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.', 68, $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 ( 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,);
}
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() %}
<r data-html=\"true\"
data-toggle=\"tooltip\"
data-placement=\"top\"
data-original-title=\"Рейтинг компании <br> за 90 дней\">
<span class=\"yellow-span\">★</span>{{ rating }}
</r>
Отзывы {% if showCommentsAmount %}({{ commentsAmount }})
{% 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/test/templates/Slivki/comments/comments_list.html.twig");
}
}