Skip to content

Commit

Permalink
SV-35 Show number of votes on the results
Browse files Browse the repository at this point in the history
  • Loading branch information
odeialba committed Nov 10, 2023
1 parent 990819a commit ca5e3a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions templates/sort_voting_results.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@
{{#votes}}
<tr>
<td>
<div {{^showvotescount}}
<div {{#showvotescount}}
data-toggle="tooltip"
data-placement="left"
class="text-info"
title="{{#str}} xvotesreceived, mod_sortvoting, {{votescount}} {{/str}}"
{{/showvotescount}} >
{{position}}
{{position}} {{showvotescount}}
</div>
</td>
<td>{{text}}</td>
Expand Down

0 comments on commit ca5e3a8

Please sign in to comment.