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