modules/XC/CrispWhiteSkin/templates/web/customer/modules/XC/Reviews/product/details/rating.twig line 1

Open in your IDE?
  1. {##
  2.  # Rating value in product info
  3.  #
  4.  # @ListChild (list="reviews.product.rating.average", weight="100")
  5.  #}
  6. {% if this.isVisibleAverageRatingOnPage() %}
  7.   <div class="product-average-rating">
  8.     <input type="hidden" name="target_widget"
  9.            value="\XC\Reviews\View\Customer\ProductInfo\Details\AverageRating"/>
  10.     <input type="hidden" name="widgetMode" value="{{ this.getWidgetMode() }}"/>
  11.     {{ widget_list('reviews.product.rating', product=this.getRatedProduct()) }}
  12.     {% if this.getWidgetMode() == 'product-details' %}
  13.       <span class="{{ this.getAverageRatingSpanCssClass() }}">{{ this.getAverageRating() }}</span>
  14.     {% endif %}
  15.     {% if this.isVisibleReviewsCount() %}
  16.       <span class="separator">|</span>
  17.       <div class="reviews-count no-reviews">
  18.         {% if this.getWidgetMode() == 'product-details' %}
  19.           <span>
  20.             <a href="{{ this.getRatedProductURL() }}" class="link-to-tab">
  21.               {{ t('Reviews: X', {'count': this.getReviewsCount()}) }}
  22.             </a>
  23.           </span>
  24.         {% else %}
  25.           &mdash;
  26.           <a href="{{ this.getRatedProductURL() }}" class="link-to-tab">
  27.             {{ this.getReviewsCount() }}
  28.           </a>
  29.         {% endif %}
  30.       </div>
  31.     {% endif %}
  32.     {% if this.isVisibleAddReviewLink(this.product) %}
  33.       <span class="separator">|</span>
  34.       {% if this.isReplaceAddReviewWithLogin() %}
  35.         {{ widget('\\XC\\Reviews\\View\\Button\\PopupLoginLink', label=this.getReviewsLinkLabel(), product=this.product) }}
  36.       {% else %}
  37.         <a href="{{ this.getRatedProductURL() }}" class="link-to-tab">
  38.           {{ widget('\\XC\\Reviews\\View\\Button\\Customer\\AddReviewLink', label=this.getReviewsLinkLabel(), product=this.product) }}
  39.         </a>
  40.       {% endif %}
  41.     {% endif %}
  42.   </div>
  43. {% endif %}