templates/Slivki/comments/media_block_list.html.twig line 1

Open in your IDE?
  1. {% for comment in commentAndMediaList %}
  2.     {% for media in comment.getMedias() %}
  3.         <li>
  4.             <div class="showCommentMediaPopup">
  5.                 <div class="img" style="background-image: url('{{ getImageURL(media, 0, 600) }}')"></div>
  6.                 <div class="caption">
  7.                     <div class="caption--text">Подробнее</div>
  8.                     <i class="slivki-icon-search"></i>
  9.                 </div>
  10.                 {% set commentUser = comment.getUser() %}
  11.                 {%
  12.                     set commentData = {
  13.                         'avatar': getProfileImageURL(commentUser.getProfileImageMedia(), 60, 60),
  14.                         'userName': commentUser.getFirstName ~ ' ' ~ commentUser.getLastName,
  15.                         'rating': comment.getRating(),
  16.                         'commentText': comment.getComment(),
  17.                         'commentDate': comment.getCreatedOn()|date('d.m.Y H:i')
  18.                     }
  19.                 %}
  20.                 <input type="hidden" class="comment-data" value="{{ commentData|json_encode }}" />
  21.                 <div class="answer-button-container" style="display: none">
  22.                     {% if (not is_granted(constant('Slivki\\Entity\\UserGroup::COMMENTS_BANNED_ROLE_NAME'))) %}
  23.                         <div class="addCommentAnswerButton">
  24.                             <div class="reply link pseudo-link green text-slivki mr-2" onclick="commentAdd({{ comment.getID() }}, {{ comment.getEntityID() }}, {{ comment.getTypeID() }})"  data-toggle="modal" data-target="{{ app.user ? '#addVoteBox' : '#onlyRegistered' }}">Ответить</div>
  25.                             <div class="votesBox" id="voteBox{{ comment.getID() }}"></div>
  26.                         </div>
  27.                         {% if app.user and app.user.getID() == comment.getUser().getID() and comment.getCreatedOn|date('U') > '-7 days'|date('U') and comment.getChildren()|length == 0 %}
  28.                             <div class="editCommentAnswerButton">
  29.                                 <div class="reply link pseudo-link green text-warning mr-2" onclick="commentEdit({{ comment.getID() }})" >Редактировать</div>
  30.                             </div>
  31.                         {% endif %}
  32.                     {% endif %}
  33.                 </div>
  34.             </div>
  35.         </li>
  36.     {% endfor %}
  37. {% endfor %}