<?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_item.html.twig */
class __TwigTemplate_246738b93792b6cd93fdc1ac9f8922b4e6d727547b86116c30a5caddf134f788 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_item.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_item.html.twig"));
// line 1
echo "<li>
<div class=\"comments-list-item ";
// line 2
echo (((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 2, $this->source); })()), "getChildren", [], "method", false, false, false, 2)), 0))) ? ("comments-list-item--has-child") : (""));
echo " ";
echo ((twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 2, $this->source); })()), "isDeleted", [], "method", false, false, false, 2)) ? ("comments-list-item--deleted") : (""));
echo "\" data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 2, $this->source); })()), "getID", [], "method", false, false, false, 2), "html", null, true);
echo "\" data-oid=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 2, $this->source); })()), "getEntityID", [], "method", false, false, false, 2), "html", null, true);
echo "\" data-uid=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 2, $this->source); })()), "getUserID", [], "method", false, false, false, 2), "html", null, true);
echo "\" data-time=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 2, $this->source); })()), "getCreatedOn", [], "method", false, false, false, 2), "format", [0 => "Y-m-d H:i:s"], "method", false, false, false, 2), "html", null, true);
echo "\">
<div class=\"fake\" id=\"comment";
// line 3
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 3, $this->source); })()), "getID", [], "method", false, false, false, 3), "html", null, true);
echo "\"></div>
";
// line 4
$context["commentEntity"] = $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCommentEntityByType(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 4, $this->source); })()), "getEntityID", [], "method", false, false, false, 4), twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 4, $this->source); })()), "getTypeID", [], "method", false, false, false, 4));
// line 5
echo " ";
if ((isset($context["isLiveComments"]) || array_key_exists("isLiveComments", $context) ? $context["isLiveComments"] : (function () { throw new RuntimeError('Variable "isLiveComments" does not exist.', 5, $this->source); })())) {
// line 6
echo " ";
$context["urlAction"] = "Slivki:Default:details";
// line 7
echo " ";
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 7, $this->source); })()), "getTypeID", [], "method", false, false, false, 7), twig_constant("Slivki\\Entity\\Comment::TYPE_SALE_COMMENT")))) {
// line 8
echo " ";
$context["urlAction"] = "Slivki:Sale:details";
// line 9
echo " ";
}
// line 10
echo " ";
if (((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 10, $this->source); })()), "getTypeID", [], "method", false, false, false, 10), twig_constant("Slivki\\Entity\\Comment::TYPE_MALL_BRAND_COMMENT"))) || (0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 10, $this->source); })()), "getTypeID", [], "method", false, false, false, 10), twig_constant("Slivki\\Entity\\Comment::TYPE_DIRECTOR_COMMENT"))))) {
// line 11
echo " ";
$context["commentEntityTitle"] = twig_get_attribute($this->env, $this->source, (isset($context["commentEntity"]) || array_key_exists("commentEntity", $context) ? $context["commentEntity"] : (function () { throw new RuntimeError('Variable "commentEntity" does not exist.', 11, $this->source); })()), "getName", [], "method", false, false, false, 11);
// line 12
echo " ";
} else {
// line 13
echo " ";
$context["commentEntityTitle"] = twig_get_attribute($this->env, $this->source, (isset($context["commentEntity"]) || array_key_exists("commentEntity", $context) ? $context["commentEntity"] : (function () { throw new RuntimeError('Variable "commentEntity" does not exist.', 13, $this->source); })()), "getTitle", [], "method", false, false, false, 13);
// line 14
echo " ";
}
// line 15
echo " <a class=\"voteMarketActionUrl\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getURL((isset($context["urlAction"]) || array_key_exists("urlAction", $context) ? $context["urlAction"] : (function () { throw new RuntimeError('Variable "urlAction" does not exist.', 15, $this->source); })()), twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 15, $this->source); })()), "getEntityID", [], "method", false, false, false, 15)), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, (isset($context["commentEntityTitle"]) || array_key_exists("commentEntityTitle", $context) ? $context["commentEntityTitle"] : (function () { throw new RuntimeError('Variable "commentEntityTitle" does not exist.', 15, $this->source); })()), "html", null, true);
echo "</a>
";
}
// line 17
echo " <div class=\"meta\">
<div class=\"avatar\" style=\"background-image: url('";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getProfileImageURL(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 18, $this->source); })()), "getUser", [], "method", false, false, false, 18), "getProfileImageMedia", [], "method", false, false, false, 18), 100, 100), "html", null, true);
echo "');\"></div>
<div class=\"col\" style=\"display: flex; flex-direction: column\">
<div class=\"author\">";
// line 20
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 20, $this->source); })()), "getUser", [], "method", false, false, false, 20), "getFirstName", [], "method", false, false, false, 20), "html", null, true);
echo "</div>
<time class=\"date\">";
// line 21
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 21, $this->source); })()), "getCreatedOn", [], "method", false, false, false, 21), "format", [0 => "d.m.Y, H:i"], "method", false, false, false, 21), "html", null, true);
echo "</time>
<ul class=\"rating-stars\">
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, 5));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 24
echo " <li ";
echo (((0 <= twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 24, $this->source); })()), "getRating", [], "method", false, false, false, 24), $context["i"]))) ? ("class=\"rated\"") : (""));
echo "><i class=\"slivki-icon-star\"></i></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " </ul>
</div>
";
// line 28
if ((((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 28, $this->source); })()), "getTypeID", [], "method", false, false, false, 28), twig_constant("Slivki\\Entity\\Comment::TYPE_OFFER_COMMENT"))) || (0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 28, $this->source); })()), "getTypeID", [], "method", false, false, false, 28), twig_constant("Slivki\\Entity\\Comment::TYPE_SALE_COMMENT")))) && (0 !== twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 29
(isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 29, $this->source); })()), "getUser", [], "method", false, false, false, 29), "getEmail", [], "method", false, false, false, 29), "slivkiminsk@gmail.com")))) {
// line 30
echo " <div class=\"date-for-registrate\">
Пользователь на сайте с ";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 31, $this->source); })()), "getUser", [], "method", false, false, false, 31), "createdOn", [], "any", false, false, false, 31), "format", [0 => "d.m.Y"], "method", false, false, false, 31), "html", null, true);
echo "
</div>
<div class=\"comment-codes\">
Взято кодов
<div class=\"border-comment-codes\">
";
// line 36
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 36, $this->source); })()), "getTypeID", [], "method", false, false, false, 36), twig_constant("Slivki\\Entity\\Comment::TYPE_OFFER_COMMENT")))) {
// line 37
echo " <div class=\"current mr-2\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"По этой акции\">
";
// line 38
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 38, $this->source); })()), "getUser", [], "method", false, false, false, 38), "getCodesCountByOffer", [0 => (isset($context["commentEntity"]) || array_key_exists("commentEntity", $context) ? $context["commentEntity"] : (function () { throw new RuntimeError('Variable "commentEntity" does not exist.', 38, $this->source); })())], "method", false, false, false, 38), "html", null, true);
echo "
</div>
";
}
// line 41
echo "
";
// line 42
$context["splitTotalCodesCountByUser"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 42, $this->source); })()), "getUser", [], "method", false, false, false, 42), "getSplitTotalCodesCount", [], "method", false, false, false, 42);
// line 43
echo " ";
$context["codesCountByUser"] = twig_get_attribute($this->env, $this->source, (isset($context["splitTotalCodesCountByUser"]) || array_key_exists("splitTotalCodesCountByUser", $context) ? $context["splitTotalCodesCountByUser"] : (function () { throw new RuntimeError('Variable "splitTotalCodesCountByUser" does not exist.', 43, $this->source); })()), "paidCodesCount", [], "array", false, false, false, 43);
// line 44
echo " ";
$context["codesCountByUserTitle"] = "За всё время";
// line 45
echo " <div class=\"all\" data-toggle=\"tooltip\" data-placement=\"top\" data-original-title=\"";
echo twig_escape_filter($this->env, (isset($context["codesCountByUserTitle"]) || array_key_exists("codesCountByUserTitle", $context) ? $context["codesCountByUserTitle"] : (function () { throw new RuntimeError('Variable "codesCountByUserTitle" does not exist.', 45, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, (isset($context["codesCountByUser"]) || array_key_exists("codesCountByUser", $context) ? $context["codesCountByUser"] : (function () { throw new RuntimeError('Variable "codesCountByUser" does not exist.', 45, $this->source); })()), "html", null, true);
echo "</div>
</div>
</div>
";
// line 48
if ((1 === twig_compare($this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCommentsCountByUserID(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 48, $this->source); })()), "getUserID", [], "method", false, false, false, 48), twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 48, $this->source); })()), "getEntityID", [], "method", false, false, false, 48), twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 48, $this->source); })()), "getTypeID", [], "method", false, false, false, 48)), 1))) {
// line 49
echo " <div class=\"megaphone\" data-toggle=\"tooltip\" data-placement=\"top\" data-original-title=\"Все отзывы пользователя к этой акции\"><i class=\"slivki-icon-volume-up\"></i></div>
";
}
// line 51
echo " ";
}
// line 52
echo " <div class=\"clear\"></div>
<div class=\"message voteComment body\">
";
// line 54
echo ((twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 54, $this->source); })()), "isDeleted", [], "method", false, false, false, 54)) ? ("Комментарий удален пользователем") : (twig_nl2br(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 54, $this->source); })()), "getLinkifyComment", [], "method", false, false, false, 54))));
echo "
</div>
<div class=\"comment-media-placeholder\">
";
// line 58
if (((1 === twig_compare(twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 58, $this->source); })()), "getMedias", [], "method", false, false, false, 58)), 0)) && !twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 58, $this->source); })()), "isDeleted", [], "method", false, false, false, 58))) {
// line 59
echo " <div class=\"userVoteImages\">
<div class=\"commentImageWrapper\">
";
// line 61
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 61, $this->source); })()), "getMedias", [], "method", false, false, false, 61));
foreach ($context['_seq'] as $context["_key"] => $context["media"]) {
// line 62
echo " <a class=\"voteImages";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["media"], "getID", [], "method", false, false, false, 62), "html", null, true);
echo "\" href=\"";
echo twig_escape_filter($this->env, twig_constant("\\Slivki\\Services\\ImageService::MEDIA_ROOT"), "html", null, true);
echo twig_escape_filter($this->env, twig_constant("\\Slivki\\Services\\ImageService::INITIAL_PATH"), "html", null, true);
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["media"], "getPath", [], "method", false, false, false, 62), "html", null, true);
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["media"], "getName", [], "method", false, false, false, 62), "html", null, true);
echo "\" data-lightbox=\"image";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["media"], "getID", [], "method", false, false, false, 62), "html", null, true);
echo "\">
<img class=\"voteImage\" alt=\"\" src=\"";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL($context["media"], 0, 400), "html", null, true);
echo "\">
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['media'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 66
echo " </div>
</div>
";
}
// line 69
echo " </div>
";
// line 71
if ( !$this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted(twig_constant("Slivki\\Entity\\UserGroup::COMMENTS_BANNED_ROLE_NAME"))) {
// line 72
echo " <div class=\"addCommentAnswerButton\">
<div class=\"reply link pseudo-link green\" onclick=\"commentAdd(";
// line 73
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 73, $this->source); })()), "getID", [], "method", false, false, false, 73), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 73, $this->source); })()), "getEntityID", [], "method", false, false, false, 73), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 73, $this->source); })()), "getTypeID", [], "method", false, false, false, 73), "html", null, true);
echo ")\" data-toggle=\"modal\" data-target=\"";
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.', 73, $this->source); })()), "user", [], "any", false, false, false, 73)) ? ("#addVoteBox") : ("#onlyRegistered"));
echo "\">Ответить</div>
<div class=\"votesBox\" id=\"voteBox";
// line 74
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 74, $this->source); })()), "getID", [], "method", false, false, false, 74), "html", null, true);
echo "\"></div>
</div>
<div class=\"likes-box float-right\">
";
// line 77
$context["votes"] = twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 77, $this->source); })()), "getLikesAmount", [], "method", false, false, false, 77);
// line 78
echo " <a class=\"like-button\" href=\"#\"><i
class=\"slivki-icon-thumbs-up\"></i><span>";
// line 79
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["votes"]) || array_key_exists("votes", $context) ? $context["votes"] : (function () { throw new RuntimeError('Variable "votes" does not exist.', 79, $this->source); })()), "likesAmount", [], "any", false, false, false, 79), "html", null, true);
echo "</span></a>
<a class=\"dislike-button\" href=\"#\"><i
class=\"slivki-icon-thumbs-down\"></i><span>";
// line 81
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["votes"]) || array_key_exists("votes", $context) ? $context["votes"] : (function () { throw new RuntimeError('Variable "votes" does not exist.', 81, $this->source); })()), "dislikesAmount", [], "any", false, false, false, 81), "html", null, true);
echo "</span></a>
</div>
";
}
// line 84
echo "
";
// line 85
if (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 85, $this->source); })()), "getAdminComment", [], "method", false, false, false, 85))) {
// line 86
echo " <div class=\"admin-comment\">
<div class=\"comment\">
<div class=\"body\">
<div class=\"info info-admin\">
<img src=\"/images/v-36-1.png\">
</div>
<div class=\"message\">";
// line 92
echo twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 92, $this->source); })()), "getAdminComment", [], "method", false, false, false, 92);
echo "</div>
</div>
</div>
</div>
";
}
// line 97
echo " </div>
<div class=\"all-in-offer-by-user\">
<div class=\"all-in-offer-by-user--title\">Отзывы пользователя к этой акции</div>
<div class=\"all-in-offer-by-user--comments\"></div>
<input type=\"hidden\" class=\"user-comments-url\" value=\"/comments/get_by_user/";
// line 102
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 102, $this->source); })()), "getUser", [], "method", false, false, false, 102), "getID", [], "method", false, false, false, 102), "html", null, true);
echo "?offerID=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["comment"]) || array_key_exists("comment", $context) ? $context["comment"] : (function () { throw new RuntimeError('Variable "comment" does not exist.', 102, $this->source); })()), "getEntityID", [], "method", false, false, false, 102), "html", null, true);
echo "\"/>
</div>
</div>
</li>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Slivki/comments/comments_item.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 308 => 102, 301 => 97, 293 => 92, 285 => 86, 283 => 85, 280 => 84, 274 => 81, 269 => 79, 266 => 78, 264 => 77, 258 => 74, 248 => 73, 245 => 72, 243 => 71, 239 => 69, 234 => 66, 225 => 63, 213 => 62, 209 => 61, 205 => 59, 203 => 58, 196 => 54, 192 => 52, 189 => 51, 185 => 49, 183 => 48, 174 => 45, 171 => 44, 168 => 43, 166 => 42, 163 => 41, 157 => 38, 154 => 37, 152 => 36, 144 => 31, 141 => 30, 139 => 29, 138 => 28, 134 => 26, 125 => 24, 121 => 23, 116 => 21, 112 => 20, 107 => 18, 104 => 17, 96 => 15, 93 => 14, 90 => 13, 87 => 12, 84 => 11, 81 => 10, 78 => 9, 75 => 8, 72 => 7, 69 => 6, 66 => 5, 64 => 4, 60 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<li>
<div class=\"comments-list-item {{ comment.getChildren()|length > 0 ? 'comments-list-item--has-child' }} {{ comment.isDeleted() ? 'comments-list-item--deleted' }}\" data-id=\"{{ comment.getID() }}\" data-oid=\"{{ comment.getEntityID() }}\" data-uid=\"{{ comment.getUserID() }}\" data-time=\"{{ comment.getCreatedOn().format('Y-m-d H:i:s') }}\">
<div class=\"fake\" id=\"comment{{ comment.getID() }}\"></div>
{% set commentEntity = getCommentEntityByType(comment.getEntityID(), comment.getTypeID()) %}
{% if isLiveComments %}
{% set urlAction = 'Slivki:Default:details' %}
{% if (comment.getTypeID() == constant('Slivki\\\\Entity\\\\Comment::TYPE_SALE_COMMENT')) %}
{% set urlAction = 'Slivki:Sale:details' %}
{% endif %}
{% if (comment.getTypeID() == constant('Slivki\\\\Entity\\\\Comment::TYPE_MALL_BRAND_COMMENT') or comment.getTypeID() == constant('Slivki\\\\Entity\\\\Comment::TYPE_DIRECTOR_COMMENT')) %}
{% set commentEntityTitle = commentEntity.getName() %}
{% else %}
{% set commentEntityTitle = commentEntity.getTitle() %}
{% endif %}
<a class=\"voteMarketActionUrl\" href=\"{{ getURL(urlAction, comment.getEntityID()) }}\">{{ commentEntityTitle }}</a>
{% endif %}
<div class=\"meta\">
<div class=\"avatar\" style=\"background-image: url('{{ getProfileImageURL(comment.getUser().getProfileImageMedia(), 100, 100) }}');\"></div>
<div class=\"col\" style=\"display: flex; flex-direction: column\">
<div class=\"author\">{{ comment.getUser().getFirstName() }}</div>
<time class=\"date\">{{ comment.getCreatedOn().format('d.m.Y, H:i') }}</time>
<ul class=\"rating-stars\">
{% for i in 1..5 %}
<li {{ (comment.getRating() >= i) ? 'class=\"rated\"' : '' }}><i class=\"slivki-icon-star\"></i></li>
{% endfor %}
</ul>
</div>
{% if((comment.getTypeID() == constant('Slivki\\\\Entity\\\\Comment::TYPE_OFFER_COMMENT') or comment.getTypeID() == constant('Slivki\\\\Entity\\\\Comment::TYPE_SALE_COMMENT'))
and comment.getUser().getEmail() != 'slivkiminsk@gmail.com') %}
<div class=\"date-for-registrate\">
Пользователь на сайте с {{ comment.getUser().createdOn.format('d.m.Y') }}
</div>
<div class=\"comment-codes\">
Взято кодов
<div class=\"border-comment-codes\">
{% if comment.getTypeID() == constant('Slivki\\\\Entity\\\\Comment::TYPE_OFFER_COMMENT') %}
<div class=\"current mr-2\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"По этой акции\">
{{ comment.getUser().getCodesCountByOffer(commentEntity) }}
</div>
{% endif %}
{% set splitTotalCodesCountByUser = comment.getUser().getSplitTotalCodesCount() %}
{% set codesCountByUser = splitTotalCodesCountByUser['paidCodesCount'] %}
{% set codesCountByUserTitle = \"За всё время\" %}
<div class=\"all\" data-toggle=\"tooltip\" data-placement=\"top\" data-original-title=\"{{ codesCountByUserTitle }}\">{{ codesCountByUser }}</div>
</div>
</div>
{% if getCommentsCountByUserID(comment.getUserID(), comment.getEntityID(), comment.getTypeID()) > 1 %}
<div class=\"megaphone\" data-toggle=\"tooltip\" data-placement=\"top\" data-original-title=\"Все отзывы пользователя к этой акции\"><i class=\"slivki-icon-volume-up\"></i></div>
{% endif %}
{% endif %}
<div class=\"clear\"></div>
<div class=\"message voteComment body\">
{{ comment.isDeleted() ? 'Комментарий удален пользователем' : comment.getLinkifyComment()|raw|nl2br }}
</div>
<div class=\"comment-media-placeholder\">
{% if comment.getMedias()|length > 0 and not comment.isDeleted() %}
<div class=\"userVoteImages\">
<div class=\"commentImageWrapper\">
{% for media in comment.getMedias() %}
<a class=\"voteImages{{ media.getID() }}\" href=\"{{ constant('\\\\Slivki\\\\Services\\\\ImageService::MEDIA_ROOT') }}{{ constant('\\\\Slivki\\\\Services\\\\ImageService::INITIAL_PATH') }}{{ media.getPath() }}{{ media.getName() }}\" data-lightbox=\"image{{ media.getID() }}\">
<img class=\"voteImage\" alt=\"\" src=\"{{ getImageURL(media, 0, 400) }}\">
</a>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% if not is_granted(constant('Slivki\\\\Entity\\\\UserGroup::COMMENTS_BANNED_ROLE_NAME')) %}
<div class=\"addCommentAnswerButton\">
<div class=\"reply link pseudo-link green\" onclick=\"commentAdd({{ comment.getID() }}, {{ comment.getEntityID() }}, {{ comment.getTypeID() }})\" data-toggle=\"modal\" data-target=\"{{ app.user ? '#addVoteBox' : '#onlyRegistered' }}\">Ответить</div>
<div class=\"votesBox\" id=\"voteBox{{ comment.getID() }}\"></div>
</div>
<div class=\"likes-box float-right\">
{% set votes = comment.getLikesAmount() %}
<a class=\"like-button\" href=\"#\"><i
class=\"slivki-icon-thumbs-up\"></i><span>{{ votes.likesAmount }}</span></a>
<a class=\"dislike-button\" href=\"#\"><i
class=\"slivki-icon-thumbs-down\"></i><span>{{ votes.dislikesAmount }}</span></a>
</div>
{% endif %}
{% if comment.getAdminComment()|length %}
<div class=\"admin-comment\">
<div class=\"comment\">
<div class=\"body\">
<div class=\"info info-admin\">
<img src=\"/images/v-36-1.png\">
</div>
<div class=\"message\">{{ comment.getAdminComment()|raw }}</div>
</div>
</div>
</div>
{% endif %}
</div>
<div class=\"all-in-offer-by-user\">
<div class=\"all-in-offer-by-user--title\">Отзывы пользователя к этой акции</div>
<div class=\"all-in-offer-by-user--comments\"></div>
<input type=\"hidden\" class=\"user-comments-url\" value=\"/comments/get_by_user/{{ comment.getUser().getID() }}?offerID={{ comment.getEntityID() }}\"/>
</div>
</div>
</li>", "Slivki/comments/comments_item.html.twig", "/mnt/data/virtwww/slivki/templates/Slivki/comments/comments_item.html.twig");
}
}