Skip to content

Commit

Permalink
Merge pull request #45 from odeialba/SV-35-2
Browse files Browse the repository at this point in the history
SV-35 Show number of votes on the results
  • Loading branch information
odeialba authored Nov 10, 2023
2 parents 990819a + ca5e3a8 commit 8b40743
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 8b40743

Please sign in to comment.