Fixed several things in assignment app. See #1838.

Fixed "Add Me" and "Remove Me" button.

Show poll results for normal users.

Reverse ballot tab order.
This commit is contained in:
Norman Jäckel 2016-01-13 15:28:30 +01:00
parent 919425cbb3
commit 441c297986
2 changed files with 4 additions and 3 deletions

View File

@ -171,7 +171,8 @@ class AssignmentShortPollSerializer(AssignmentAllPollSerializer):
'options', 'options',
'votesvalid', 'votesvalid',
'votesinvalid', 'votesinvalid',
'votescast',) 'votescast',
'has_votes',)
class AssignmentFullSerializer(ModelSerializer): class AssignmentFullSerializer(ModelSerializer):

View File

@ -73,7 +73,7 @@
</a> </a>
</span> </span>
</div> </div>
<p os-perm="assignments.can_nominate_self"> <p os-perms="assignments.can_nominate_self">
<button ng-if="!isCandidate()" ng-click="addMe()" class="btn btn-default"> <button ng-if="!isCandidate()" ng-click="addMe()" class="btn btn-default">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
<translate>Add me</translate> <translate>Add me</translate>
@ -91,7 +91,7 @@
</button> </button>
<uib-tabset class="spacer"> <uib-tabset class="spacer">
<uib-tab ng-repeat="poll in assignment.polls" heading="Ballot {{$index+1}}"> <uib-tab ng-repeat="poll in assignment.polls | orderBy:'-id'" heading="Ballot {{ assignment.polls.length - $index }}">
<div os-perms="assignments.can_manage" class="spacer"> <div os-perms="assignments.can_manage" class="spacer">
<!-- angular requires to open the link in new tab with "target='_blank'". <!-- angular requires to open the link in new tab with "target='_blank'".
Otherwise the pdf url can't be open in same window; angular redirects to "/". --> Otherwise the pdf url can't be open in same window; angular redirects to "/". -->