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

Open in your IDE?
  1. <div class="votes">
  2.     <div class="votesBox comments-list" id="addVotesButton">
  3.         <div class="votesBoxTitle title d-flex">
  4.             <div class="offer-titles">
  5.                 <h2>{% if not isMobileDevice() %}Отзывы {% if showCommentsAmount %}({{ commentsAmount }})
  6.                         <r data-html="true"
  7.                            data-toggle="tooltip"
  8.                            data-placement="top"
  9.                            data-original-title="Рейтинг компании <br> за 90 дней">
  10.                             <span class="yellow-span">★</span>{{ rating }}
  11.                         </r>
  12.                     {% endif %}{% endif %}
  13.                 </h2>
  14.             </div>
  15.             {% if (not is_granted(constant('Slivki\\Entity\\UserGroup::COMMENTS_BANNED_ROLE_NAME'))) %}
  16.                 {% set buttonCaption = type == constant('Slivki\\Entity\\Comment::TYPE_MALL_BRAND_COMMENT') ? 'Добавить' : 'Добавить отзыв'%}
  17.                 <span class="addVoteLink"
  18.                       id="addVoteLink"
  19.                       data-oid="{{ entityID }}"
  20.                       data-type="{{ type }}"
  21.                       data-action="comment_add"
  22.                       data-toggle="modal"
  23.                       data-target="{{ app.user ? '#addVoteBox' : '#onlyRegistered' }}">
  24.                     <img src="/images/pencil.svg" alt="Добавить" class="pencil-icon">{{ buttonCaption }}
  25.                 </span>
  26.             {% endif %}
  27.         </div>
  28.         <p class="sf-font mt-5 font-bold font-size-17">Фотографии пользователей:</p>
  29.     </div>
  30.     {% if not isMobileDevice() %}
  31.         {% if (type == constant('Slivki\\Entity\\Comment::TYPE_OFFER_COMMENT')) %}
  32.             {% set userCommentMediaBlock = getUserCommentsMediaBlockByEntityID(entityID, 'offer') %}
  33.             {% set offerSupplierPhotoBlock = getSupplierOfferPhotoBlockByOfferID(entityID) %}
  34.             {% if userCommentMediaBlock != '' and offerSupplierPhotoBlock != '' %}
  35.                 <ul id="commentPhotoTabs" class="nav nav-tabs" role="tablist">
  36.                     <li class="active single-line"><a href="#commentSupplierPhotoTab" role="tab" data-toggle="tab">Фото работ</a></li>
  37.                     <li class="single-line"><a href="#commentUserPhotoTab" role="tab" data-toggle="tab">Фото из отзывов</a></li>
  38.                 </ul>
  39.                 <div class="tab-content">
  40.                     <div class="tab-pane fade in active" id="commentSupplierPhotoTab">
  41.                         {{ offerSupplierPhotoBlock|raw }}
  42.                     </div>
  43.                     <div class="tab-pane fade" id="commentUserPhotoTab">
  44.                         {{ userCommentMediaBlock|raw }}
  45.                     </div>
  46.                 </div>
  47.             {% elseif userCommentMediaBlock != '' %}
  48.                 {{ userCommentMediaBlock|raw }}
  49.             {% elseif offerSupplierPhotoBlock != '' %}
  50.                 {{ offerSupplierPhotoBlock|raw }}
  51.             {% endif %}
  52.         {% endif %}
  53.     {% endif %}
  54.     <div class="userVotes message comments-content">
  55.         {% if commentsAmount == 0  %}
  56.             <div class="comment-banners-block" data-position="no-comments">
  57.                 {% for banners in getCommentsBanners() %}
  58.                     {% for banner in banners %}
  59.                         <div class="comment-banner-rotation">{{ banner|raw }}</div>
  60.                     {% endfor %}
  61.                 {% endfor %}
  62.             </div>
  63.             {% if not isMobileDevice() %}
  64.                 <div>Будьте первым, кто оставит комментарий к этой акции.</div>
  65.             {% endif %}
  66.         {% endif %}
  67.         {{ comments is defined ? comments|raw }}
  68.         <div><img class="ajaxLoader" src="/images/image-preview-ajax-loader.gif" alt="Загрузка..."></div>
  69.     </div>
  70. </div>