{% load mezzanine_tags rating_tags i18n %}

<div class="panel rating">

<p id="rating-{{ rating_object.id }}">
    {% if rating_average %}
    {% trans "Current rating" %}: {{ rating_average|floatformat }}
    {% else %}
    {% trans "Currently unrated" %}
    {% endif %}
</p>

<form method="post" action="{% url rating %}">
    {% nevercache %}
    {% csrf_token %}
    {% endnevercache %}
    <ul>{{ rating_form.as_ul }}</ul>
    <input type="submit" class="btn" value="{% trans "Rate" %}"
        onclick="return $(this.form).find('input:checked').length == 1;">
</form>

<br style="clear:both">

</div>
