Merge pull request #863 from typonaut/patch-5

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:
Garret Wassermann 2020-08-19 13:10:33 -04:00 committed by GitHub
commit c5d27e8423
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>