{% load i18n comments %} {% load satchmo_ratings %}

{% trans 'Product Reviews' %}

{% get_comment_list for product as comments %} {% if not comments %} {% if user.is_authenticated %} {% trans 'Be the first to review it!' %} {% endif %} {% else %} {% with product|product_rating_average_string as rating %}

{% blocktrans %}Average rating {{rating}}{% endblocktrans %}

{% endwith %} {% for comment in comments %}

{% if comment.user.get_full_name %}{{ comment.user.get_full_name|escape }}{% else %}{{ comment.user.username|escape }}{% endif %} — {{ comment.submit_date|date:"F j, Y" }}{% if comment.productrating.rating %} — {% trans 'Rating' %} {{ comment.productrating.rating }}/5{% endif %}

{{ comment.comment|escape|urlizetrunc:40|linebreaks }}
{% endfor %} {% endif %} {% if user.is_authenticated %}

{% trans 'Review this product' %}

{% get_comment_form for product as form %} {% product_rating_form request product form %} {% else %} {% trans 'Please login to review this product.' %} {% endif %}