<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>