Show current rating in interaction rating

This commit is contained in:
Mouse Reeve
2020-04-03 13:36:56 -07:00
parent a27effd05d
commit d91b77f49e
6 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<span class="hidden-text">Leave a rating</span>
<div class="stars">
{% for i in '12345'|make_list %}
<span class="icon icon-star-{% if rating < forloop.counter %}empty{% else %}full{% endif %}">
<span class="icon icon-star-{% if rating < forloop.counter %}empty{% elif rating|floatformat < forloop.counter %}half{% else %}full{% endif %}">
<span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
</span>
{% endfor %}