From ca3133c17de62dc1b2a53ac9c9e128053c5a4bd1 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 10 Mar 2022 23:48:04 -0600 Subject: [PATCH] Allow admin to see voting stat --- templates/problem/problem.html | 2 +- templates/problem/voting-controls.html | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/problem/problem.html b/templates/problem/problem.html index c37ef86..ab89be7 100644 --- a/templates/problem/problem.html +++ b/templates/problem/problem.html @@ -349,7 +349,7 @@ {% endblock %} {% block post_description_end %} - {% if can_vote %} + {% if can_vote or request.user.is_superuser %} {% include 'problem/voting-controls.html' %} {% endif %} {% if request.user.is_authenticated and not request.profile.mute %} diff --git a/templates/problem/voting-controls.html b/templates/problem/voting-controls.html index 0d0d4ab..1f93193 100644 --- a/templates/problem/voting-controls.html +++ b/templates/problem/voting-controls.html @@ -25,12 +25,14 @@ } -{% if can_vote %} +{% if can_vote or request.user.is_superuser %} - + {% if can_vote %} + + {% endif %} {% if request.user.is_superuser %} - {% include 'problem/voting-stats.html' %} {% endif %}