Hide candidate list if assignment phase is finished (2).

This commit is contained in:
Emanuel Schuetze 2016-04-12 22:41:15 +02:00
parent f5125d0d23
commit 7e5ea61b34

View File

@ -75,39 +75,41 @@
<h3 translate>Description</h3> <h3 translate>Description</h3>
<div class="white-space-pre-line">{{ assignment.description }}</div> <div class="white-space-pre-line">{{ assignment.description }}</div>
<h3 translate>Candidates</h3> <div ng-if="assignment.phase != 2">
<ol> <h3 translate>Candidates</h3>
<li ng-repeat="related_user in assignment.assignment_related_users"> <ol>
<a ui-sref="users.user.detail({id: related_user.user_id})">{{ related_user.user.get_full_name() }}</a> <li ng-repeat="related_user in assignment.assignment_related_users">
<i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i> <a ui-sref="users.user.detail({id: related_user.user_id})">{{ related_user.user.get_full_name() }}</a>
<button os-perms="assignments.can_manage" ng-click="removeCandidate(related_user.user_id)" <i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i>
class="btn btn-default btn-xs"> <button os-perms="assignments.can_manage" ng-click="removeCandidate(related_user.user_id)"
<i class="fa fa-times"></i> class="btn btn-default btn-xs">
</button> <i class="fa fa-times"></i>
</ol> </button>
</ol>
<div class="form-group"> <div class="form-group">
<uib-alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}"> <uib-alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
{{ alert.msg }} {{ alert.msg }}
</uib-alert> </uib-alert>
<div os-perms="assignments.can_nominate_other"> <div os-perms="assignments.can_nominate_other">
<select chosen ng-model="candidateSelectBox.selected" ng-change="addCandidate(candidateSelectBox.selected)" <select chosen ng-model="candidateSelectBox.selected" ng-change="addCandidate(candidateSelectBox.selected)"
ng-options="user.id as user.get_full_name() for user in users" ng-options="user.id as user.get_full_name() for user in users"
search-contains="true" search-contains="true"
placeholder-text-single="'Select or search a participant ...' | translate" placeholder-text-single="'Select or search a participant ...' | translate"
no-results-text="'No results available ...' | translate" no-results-text="'No results available ...' | translate"
class="form-control"> class="form-control">
<select> <select>
</div>
<p os-perms="assignments.can_nominate_self" class="spacer">
<button ng-if="!isCandidate()" ng-click="addMe()" class="btn btn-default">
<i class="fa fa-plus"></i>
<translate>Add me</translate>
</button>
<button ng-if="isCandidate()" ng-click="removeMe()" class="btn btn-default">
<i class="fa fa-minus"></i>
<translate>Remove me</translate>
</button>
</div> </div>
<p os-perms="assignments.can_nominate_self" class="spacer">
<button ng-if="!isCandidate()" ng-click="addMe()" class="btn btn-default">
<i class="fa fa-plus"></i>
<translate>Add me</translate>
</button>
<button ng-if="isCandidate()" ng-click="removeMe()" class="btn btn-default">
<i class="fa fa-minus"></i>
<translate>Remove me</translate>
</button>
</div> </div>
<h3 translate>Election result</h3> <h3 translate>Election result</h3>