From ca5e3a8778e792b99469f00db6b73a6844722e5a Mon Sep 17 00:00:00 2001 From: Odei Alba Date: Fri, 10 Nov 2023 17:10:17 +0100 Subject: [PATCH] SV-35 Show number of votes on the results --- lib.php | 2 +- templates/sort_voting_results.mustache | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib.php b/lib.php index c9643ae..8123fd9 100644 --- a/lib.php +++ b/lib.php @@ -392,7 +392,7 @@ function sortvoting_get_response_data(stdClass $sortvoting, bool $onlyactive = t $position++; } $existingvotes[$key]->position = $position; - $existingvotes[$key]->showvotescount = $maxvotescount === (int) $vote->votescount; + $existingvotes[$key]->showvotescount = $maxvotescount !== (int) $vote->votescount; $previousvote = $vote; } diff --git a/templates/sort_voting_results.mustache b/templates/sort_voting_results.mustache index 5d56176..c6c044d 100644 --- a/templates/sort_voting_results.mustache +++ b/templates/sort_voting_results.mustache @@ -81,13 +81,13 @@ {{#votes}} -
- {{position}} + {{position}} {{showvotescount}}
{{text}}