{% load wenlincms_tags rating_tags i18n future %}

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

{% if not rated or request.user.is_authenticated %}
<form class="form-inline" role="form" method="post" action="{% url "rating" %}">
    {% nevercache %}
    {% csrf_token %}
    {% endnevercache %}
    <ul class="radio radio-inline">{{ rating_form.as_ul }}</ul>
    <input type="submit" class="btn btn-default btn-sm" value="{% trans "Rate" %}"
        onclick="return $(this.form).find('input:checked').length == 1;">
</form>
{% endif %}
