From e798f37fd6a2e76ba4937f4dbf4d60c4915e475c Mon Sep 17 00:00:00 2001 From: Deimos Date: Thu, 13 Jun 2019 15:04:25 -0600 Subject: [PATCH] Revert "Hide number of votes on comments" This reverts commit acbc422849eb07376fcf2540fb05af47b4ab6fb5. --- .../tildes/templates/macros/comments.jinja2 | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tildes/tildes/templates/macros/comments.jinja2 b/tildes/tildes/templates/macros/comments.jinja2 index 286255c..a69b7de 100644 --- a/tildes/tildes/templates/macros/comments.jinja2 +++ b/tildes/tildes/templates/macros/comments.jinja2 @@ -90,6 +90,17 @@ {% if request.has_permission('view', comment) %} + {# Show votes at the top only if it's your own comment #} + {% if request.user == comment.user and comment.num_votes > 0 %} +
{{ comment.num_votes }} + {% trans num_votes=comment.num_votes %} + vote + {% pluralize %} + votes + {% endtrans %} +
+ {% endif %} + {% if comment.is_label_active("exemplary") and request.has_permission("view_exemplary_reasons", comment) %}
Exemplary @@ -131,6 +142,17 @@ {{ comment.rendered_html|safe }} + {# Show votes at the bottom only if the viewer is logged out #} + {% if not request.user and comment.num_votes > 0 %} +
{{ comment.num_votes }} + {% trans num_votes=comment.num_votes %} + vote + {% pluralize %} + votes + {% endtrans %} +
+ {% endif %} + {% if request.has_permission('vote', comment) %} {% if comment.user_voted is defined and comment.user_voted %} @@ -152,6 +174,9 @@ data-ic-replace-target="true" >Vote {% endif %} + {% if comment.num_votes > 0 %} + ({{ comment.num_votes }}) + {% endif %} {% endif %}