custom/plugins/KMShop2022/src/Resources/views/storefront/layout/footer/rating-widget.html.twig line 1

Open in your IDE?
  1. {#
  2. {% block layout_footer_rating_widget %}
  3.     <div class="footer-column-headline">{{ "footer.tabsReview"|trans|striptags }}</div>
  4.     <div class="reviews-count">1 bis 3 von {{ page.x10.ratingTotal }} Bewertungen</div>
  5.     <div class="rating-list">
  6.         {% set reviews = page.x10.ratings %}
  7.         
  8.         {% for review in reviews %}
  9.             <div class="rating-box">
  10.                 <div class="rating-head">
  11.                     <!-- bei FB-ratings nur positive/negative typen vorhanden-->
  12.                     <div class="ratingstars">
  13.                         {% set percent = 100/5 * review.points %}
  14.                         <div class="ratingstars-inner" style="width:{{ percent }}%;"></div>
  15.                     </div>
  16.                     
  17.                     <div class="source-container text-nowrap text-truncate col-8 pl-0">
  18.                         <span class="source-title">{{ "reviews.sourceTitle"|trans|striptags }}</span>
  19.                         <span class="source-desc">
  20.                             {% if review.social_platform == 1 %}
  21.                                 Facebook
  22.                             {% else %}
  23.                                 {% set product = load_product_by_review(review.id, context) %}
  24.                                 <a href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}">{{ product.translated.name }}</a>
  25.                             {% endif %}
  26.                         </span>
  27.                     </div>
  28.                     
  29.                     <div class="rating-date">
  30.                         <span class="icon">{% sw_icon 'ratingdate' style {'namespace' : 'KMShop2022'} %}</span>
  31.                         <span class="date">{{ review.created_at|date("d.m.Y")  }}</span>
  32.                     </div>
  33.                 </div>
  34.                 <div class="rating-text">
  35.                     {{ review.content}}
  36.                     {% if review.social_id matches '/^\\d+$/' %}
  37.                                                         
  38.                     {% else  %}
  39.                         <br><br>
  40.                         <i>{{ review.social_id }}</i>
  41.                     {% endif %}
  42.                 </div>
  43.             </div>
  44.         {% endfor %}
  45.     </div>
  46.     <div class="showall">
  47.         <a href="{{ path('frontend.x10.reviews') }}" alt="{{ "footer.showall"|trans|striptags }}">{{ "footer.showall"|trans|striptags }}</a>
  48.     </div>
  49. {% endblock %}#}