Merge pull request #2848 from emanuelschuetze/issue2421
Added text to empty assignment poll result slide (Fixed #2421)
This commit is contained in:
commit
663feff806
@ -24,69 +24,76 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- vote results -->
|
<!-- vote results -->
|
||||||
<div ng-show="showResult" class="electionresults spacer" ng-repeat="poll in assignment.polls | filter: {id: element.poll}">
|
<div ng-show="showResult">
|
||||||
<table class="table table-bordered table-striped minimumTable">
|
<div ng-if="(assignment.polls | filter: {id: element.poll}).length == 0" translate>
|
||||||
<tr>
|
Waiting for results ...
|
||||||
<th translate>Candidates
|
</div>
|
||||||
<th ng-if="poll.has_votes" class="col-sm-6" translate>Votes</th>
|
|
||||||
|
|
||||||
<!-- candidates (poll options) -->
|
<div ng-repeat="poll in assignment.polls | filter: {id: element.poll}" class="electionresults spacer">
|
||||||
<tr ng-repeat="option in poll.options | orderBy:'weight'">
|
<table class="table table-bordered table-striped minimumTable">
|
||||||
|
<tr>
|
||||||
|
<th translate>Candidates
|
||||||
|
<th ng-if="poll.has_votes" class="col-sm-6" translate>Votes</th>
|
||||||
|
|
||||||
<!-- candidate name -->
|
<!-- candidates (poll options) -->
|
||||||
<td>
|
<tr ng-repeat="option in poll.options | orderBy:'weight'">
|
||||||
<i ng-if="option.is_elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i>
|
|
||||||
<strong>{{ option.candidate.get_full_name() }}</strong>
|
|
||||||
|
|
||||||
<!-- votes -->
|
<!-- candidate name -->
|
||||||
<td ng-if="poll.has_votes">
|
<td>
|
||||||
<div ng-init="votes = option.getVotes()">
|
<i ng-if="option.is_elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i>
|
||||||
<div ng-show="poll.pollmethod == 'yna' || poll.pollmethod == 'yn'">
|
<strong>{{ option.candidate.get_full_name() }}</strong>
|
||||||
<span ng-show="poll.pollmethod == 'yna'">
|
|
||||||
{{ votes[0].label }}: <strong>{{ votes[0].value }}</strong> ·
|
<!-- votes -->
|
||||||
{{ votes[1].label }}: {{ votes[1].value }} ·
|
<td ng-if="poll.has_votes">
|
||||||
{{ votes[2].label }}: {{ votes[2].value }} </span>
|
<div ng-init="votes = option.getVotes()">
|
||||||
<span ng-show="poll.pollmethod == 'yn'">
|
<div ng-show="poll.pollmethod == 'yna' || poll.pollmethod == 'yn'">
|
||||||
{{ votes[0].label }}: <strong>{{ votes[0].value }}</strong> ·
|
<span ng-show="poll.pollmethod == 'yna'">
|
||||||
{{ votes[1].label }}: {{ votes[1].value }}</span>
|
{{ votes[0].label }}: <strong>{{ votes[0].value }}</strong> ·
|
||||||
<uib-progress ng-if="votes[0].percentNumber>=0">
|
{{ votes[1].label }}: {{ votes[1].value }} ·
|
||||||
<uib-bar value="votes[0].percentNumber" type="success">
|
{{ votes[2].label }}: {{ votes[2].value }} </span>
|
||||||
<span ng-hide="votes[0].percentNumber < 5">{{votes[0].percentNumber}} %</span>
|
<span ng-show="poll.pollmethod == 'yn'">
|
||||||
</uib-bar>
|
{{ votes[0].label }}: <strong>{{ votes[0].value }}</strong> ·
|
||||||
<uib-bar value="votes[1].percentNumber" type="danger">
|
{{ votes[1].label }}: {{ votes[1].value }}</span>
|
||||||
<span ng-hide="votes[1].percentNumber < 5">{{votes[1].percentNumber}} %</span>
|
<uib-progress ng-if="votes[0].percentNumber>=0">
|
||||||
</uib-bar>
|
<uib-bar value="votes[0].percentNumber" type="success">
|
||||||
<uib-bar value="votes[2].percentNumber" type="warning">
|
<span ng-hide="votes[0].percentNumber < 5">{{votes[0].percentNumber}} %</span>
|
||||||
<span ng-hide="votes[2].percentNumber < 5">{{votes[2].percentNumber}} %</span>
|
</uib-bar>
|
||||||
</uib-bar>
|
<uib-bar value="votes[1].percentNumber" type="danger">
|
||||||
</uib-progress>
|
<span ng-hide="votes[1].percentNumber < 5">{{votes[1].percentNumber}} %</span>
|
||||||
</div>
|
</uib-bar>
|
||||||
<div ng-show="poll.pollmethod == 'votes'">
|
<uib-bar value="votes[2].percentNumber" type="warning">
|
||||||
<div ng-repeat="vote in votes">
|
<span ng-hide="votes[2].percentNumber < 5">{{votes[2].percentNumber}} %</span>
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
</uib-bar>
|
||||||
<div ng-if="vote.percentNumber >= 0">
|
</uib-progress>
|
||||||
<uib-progressbar value="vote.percentNumber" type="success"></uib-progressbar>
|
</div>
|
||||||
|
<div ng-show="poll.pollmethod == 'votes'">
|
||||||
|
<div ng-repeat="vote in votes">
|
||||||
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
|
<div ng-if="vote.percentNumber >= 0">
|
||||||
|
<uib-progressbar value="vote.percentNumber" type="success"></uib-progressbar>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- total votes (valid/invalid/casts) -->
|
<!-- total votes (valid/invalid/casts) -->
|
||||||
<tr class="total">
|
<tr class="total">
|
||||||
<td>
|
<td>
|
||||||
<translate>Valid ballots</translate>
|
<translate>Valid ballots</translate>
|
||||||
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votesvalid')">
|
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votesvalid')">
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
<tr class="total">
|
<tr class="total">
|
||||||
<td>
|
<td>
|
||||||
<translate>Invalid ballots</translate>
|
<translate>Invalid ballots</translate>
|
||||||
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votesinvalid')">
|
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votesinvalid')">
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
<tr class="total bg-info">
|
<tr class="total bg-info">
|
||||||
<td>
|
<td>
|
||||||
<translate>Casted ballots</translate>
|
<translate>Casted ballots</translate>
|
||||||
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votescast')">
|
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votescast')">
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user