{% load reviews_tags i18n %}

<div class="review-header">
    <div class="product-rating {% if product.rating != None %}{{ product.rating|as_stars }}{% else %}none{% endif %} stars-{{ product.rating }}">
    {% if product.rating != None %}
    <div class="star-outer-wrapper">
        <div class="review-counter">
            <span class="h2">{{ product.rating|floatformat }}</span>
        </div>
        {% include "oscar/catalogue/reviews/partials/stars.html" with rating=product.rating %}
    </div>

    <span class="product-rating-count">
        <a href="{% url 'catalogue:reviews-list' product_slug=product.slug product_pk=product.id %}">
{% blocktrans count product.num_approved_reviews as num_reviews %}{{ num_reviews }} customer review{% plural %}{{ num_reviews }} customer reviews{% endblocktrans %}
        </a>
    </span>
    {% else %}
    <div class="no-reviews">
        {% include "oscar/catalogue/reviews/partials/stars.html" with rating=product.rating %}
        
        <div class="review-counter">
            <small>{% trans "This product does not have any reviews yet" %}.</small>
        </div>
    </div>
    {% endif %}
    </div>
</div>