2021-04-04 13:08:42 +00:00
|
|
|
{% spaceless %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-04-04 13:08:42 +00:00
|
|
|
|
2021-04-20 18:06:14 +00:00
|
|
|
<span class="stars">
|
2021-04-04 13:08:42 +00:00
|
|
|
<span class="is-sr-only">
|
|
|
|
{% if rating %}
|
|
|
|
{% blocktranslate trimmed with rating=rating|floatformat count counter=rating|length %}
|
|
|
|
{{ rating }} star
|
|
|
|
{% plural %}
|
|
|
|
{{ rating }} stars
|
|
|
|
{% endblocktranslate %}
|
|
|
|
{% else %}
|
|
|
|
{% trans "No rating" %}
|
|
|
|
{% endif %}
|
2020-04-03 19:43:49 +00:00
|
|
|
</span>
|
2021-04-04 13:08:42 +00:00
|
|
|
|
|
|
|
{% for i in '12345'|make_list %}
|
|
|
|
<span
|
|
|
|
class="
|
|
|
|
icon is-small mr-1
|
|
|
|
icon-star-{% if rating >= forloop.counter %}full{% elif rating|floatformat:0 >= forloop.counter|floatformat:0 %}half{% else %}empty{% endif %}
|
|
|
|
"
|
|
|
|
aria-hidden="true"
|
|
|
|
></span>
|
2020-04-03 19:43:49 +00:00
|
|
|
{% endfor %}
|
2021-04-20 18:06:14 +00:00
|
|
|
</span>
|
2021-04-04 13:08:42 +00:00
|
|
|
{% endspaceless %}
|