{##
# Rating value in product info
#
# @ListChild (list="reviews.product.rating.average", weight="100")
#}
{% if this.isVisibleAverageRatingOnPage() %}
<div class="product-average-rating">
<input type="hidden" name="target_widget"
value="\XC\Reviews\View\Customer\ProductInfo\Details\AverageRating"/>
<input type="hidden" name="widgetMode" value="{{ this.getWidgetMode() }}"/>
{{ widget_list('reviews.product.rating', product=this.getRatedProduct()) }}
{% if this.getWidgetMode() == 'product-details' %}
<span class="{{ this.getAverageRatingSpanCssClass() }}">{{ this.getAverageRating() }}</span>
{% endif %}
{% if this.isVisibleReviewsCount() %}
<span class="separator">|</span>
<div class="reviews-count no-reviews">
{% if this.getWidgetMode() == 'product-details' %}
<span>
<a href="{{ this.getRatedProductURL() }}" class="link-to-tab">
{{ t('Reviews: X', {'count': this.getReviewsCount()}) }}
</a>
</span>
{% else %}
—
<a href="{{ this.getRatedProductURL() }}" class="link-to-tab">
{{ this.getReviewsCount() }}
</a>
{% endif %}
</div>
{% endif %}
{% if this.isVisibleAddReviewLink(this.product) %}
<span class="separator">|</span>
{% if this.isReplaceAddReviewWithLogin() %}
{{ widget('\\XC\\Reviews\\View\\Button\\PopupLoginLink', label=this.getReviewsLinkLabel(), product=this.product) }}
{% else %}
<a href="{{ this.getRatedProductURL() }}" class="link-to-tab">
{{ widget('\\XC\\Reviews\\View\\Button\\Customer\\AddReviewLink', label=this.getReviewsLinkLabel(), product=this.product) }}
</a>
{% endif %}
{% endif %}
</div>
{% endif %}