Hide review vote counts when 0

This commit is contained in:
rubenwardy 2021-08-18 22:49:44 +01:00
parent fab814c46f
commit 86e1f57198

@ -6,12 +6,16 @@
<button class="btn {% if is_positive == true %}btn-primary{% else %}btn-secondary{% endif %}" name="is_positive" value="yes">
<i class="fas fa-thumbs-up mr-1"></i>
{{ _("Helpful") }}
<span class="badge badge-light ml-1">{{ positive }}</span>
{% if positive > 0 %}
<span class="badge badge-light ml-1">{{ positive }}</span>
{% endif %}
</button>
<button class="btn {% if is_positive == false %}btn-primary{% else %}btn-secondary{% endif %}" name="is_positive" value="no">
<i class="fas fa-thumbs-down mr-1"></i>
{{ _("Unhelpful") }}
<span class="badge badge-light ml-1">{{ negative }}</span>
{% if negative > 0 %}
<span class="badge badge-light ml-1">{{ negative }}</span>
{% endif %}
</button>
</div>
</form>