diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-10 19:14:23 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-10 19:14:23 +0100 |
commit | 71f9fe469a60cd147e9b4ea128486f973b76c662 (patch) | |
tree | 3f954ebae8b0d97f4f02e7c13bc6d73389b1d42c | |
parent | 76b0c8446ce6571ab3a20e9c4e2c1765582c8792 (diff) | |
download | cheatdb-71f9fe469a60cd147e9b4ea128486f973b76c662.tar.xz |
Change comments button color if there are comments
-rw-r--r-- | app/templates/macros/reviews.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/templates/macros/reviews.html b/app/templates/macros/reviews.html index 2c7f293..d4869c6 100644 --- a/app/templates/macros/reviews.html +++ b/app/templates/macros/reviews.html @@ -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> |