Change comments button color if there are comments

This commit is contained in:
rubenwardy 2020-07-10 19:14:23 +01:00
parent 76b0c8446c
commit 71f9fe469a
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@
</a>
{% endif %}
<a class="btn btn-secondary" href="{{ url_for('threads.view', id=review.thread.id) }}">
<a class="btn {% if review.thread.replies.count() > 1 %} btn-primary {% else %} btn-secondary {% endif %}"
href="{{ url_for('threads.view', id=review.thread.id) }}">
<i class="fas fa-comments mr-2"></i>
{{ _("%(num)d comments", num=review.thread.replies.count() - 1) }}
</a>