commit
4a3cefadb1
@ -288,11 +288,12 @@ angular.module('OpenSlidesApp.assignments.site', ['OpenSlidesApp.assignments'])
|
||||
$scope.alert = { type: 'danger', msg: data.detail, show: true };
|
||||
});
|
||||
};
|
||||
// check if current user is already a candidate (status=1)
|
||||
// check if current user is already a candidate (elected==false)
|
||||
$scope.isCandidate = function () {
|
||||
var check = assignment.assignment_related_users.map( function(candidate) {
|
||||
if ( candidate.status == 1)
|
||||
if ( !candidate.elected ) {
|
||||
return candidate.user_id;
|
||||
}
|
||||
}).indexOf(operator.user.id);
|
||||
if (check > -1)
|
||||
return true;
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
<div class="form-group">
|
||||
<alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
|
||||
{{alert.msg}}
|
||||
{{ alert.msg }}
|
||||
</alert>
|
||||
<div os-perms="assignments.can_nominate_other" class="input-group">
|
||||
<ui-select ng-model="candidateSelectBox.selected" ng-change="addCandidate(candidateSelectBox.selected.id)">
|
||||
|
@ -86,7 +86,7 @@
|
||||
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
||||
</i>
|
||||
<th ng-click="toggleSort('open_posts')" class="sortable optional">
|
||||
<translate>Candidates</translate> / <translate>Posts</translate>
|
||||
<translate>Candidates</translate> · <translate>Posts</translate>
|
||||
<i class="pull-right fa" ng-show="sortColumn === 'open_posts' && header.sortable != false"
|
||||
ng-class="reverse ? 'fa-sort-desc' : 'fa-sort-asc'">
|
||||
</i>
|
||||
@ -122,7 +122,10 @@
|
||||
ng-bootbox-confirm="Are you sure you want to delete <b>{{ assignment.title }}</b>?"
|
||||
ng-bootbox-confirm-action="delete(assignment)" translate>Delete</a>
|
||||
</div>
|
||||
<td ng-if="!assignment.quickEdit" class="optional"><span class="badge">{{ assignment.open_posts }}</span>
|
||||
<td ng-if="!assignment.quickEdit" class="optional">
|
||||
<span class="badge">{{ assignment.assignment_related_users.length }}</span>
|
||||
/
|
||||
<span class="badge">{{ assignment.open_posts }}</span>
|
||||
<td ng-if="!assignment.quickEdit" class="optional">
|
||||
<span class="label" ng-class="{'label-primary': assignment.phase == 0,
|
||||
'label-warning': assignment.phase == 1,
|
||||
|
Loading…
Reference in New Issue
Block a user