Show candidates on assignments slide.

This commit is contained in:
Emanuel Schuetze 2016-01-18 16:27:50 +01:00
parent 59a7a02cfe
commit d083309a30
2 changed files with 12 additions and 1 deletions

View File

@ -16,13 +16,16 @@ angular.module('OpenSlidesApp.assignments.projector', ['OpenSlidesApp.assignment
.controller('SlideAssignmentCtrl', [
'$scope',
'Assignment',
function($scope, Assignment) {
'User',
function($scope, Assignment, User) {
// Attention! Each object that is used here has to be dealt on server side.
// Add it to the coresponding get_requirements method of the ProjectorElement
// class.
var id = $scope.element.id;
Assignment.find(id);
Assignment.bindOne(id, $scope, 'assignment');
User.findAll();
User.bindAll({}, $scope, 'users');
}
]);

View File

@ -1,4 +1,12 @@
<div ng-controller="SlideAssignmentCtrl" class="content scrollcontent">
<h1>{{ assignment.title }}</h1>
<div class="white-space-pre-line">{{ assignment.description }}</div>
<!-- candidates -->
<h2 translate>Candidates</h2>
<ol>
<li ng-repeat="related_user in assignment.assignment_related_users">
{{ related_user.user.get_full_name() }}
<i ng-if="related_user.elected" class="fa fa-star" title="{{ 'is elected' | translate }}"></i>
</ol>
</div>