Update kb_item.html

Standardises output between KB listing and KB item, captures problem where there may be no votes cast.
This commit is contained in:
typonaut 2020-08-19 18:07:46 +01:00 committed by GitHub
parent 41b9f38ab6
commit ff171e3c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,12 @@
<ul>
<li>{% blocktrans with item.recommendations as recommendations %}Recommendations: {{ recommendations }}{% endblocktrans %}</li>
<li>{% blocktrans with item.votes as votes %}Votes: {{ votes }}{% endblocktrans %}</li>
<li>{% blocktrans with item.score|floatformat as score %}Overall Rating: {{ score }}{% endblocktrans %}/10</li>
<li>{% trans 'Rating' %}:
{% if item.votes > 0 %}
{{ item.score|floatformat }}/10
{% else %}
{% trans 'no score yet' %}
{% endif %}</li>
</ul>
</div>
</div>