new view for current list of speakers (fixes #2212)
This commit is contained in:
parent
acf24a26ee
commit
3221ce18f6
@ -71,6 +71,22 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
.state('agenda.item.import', {
|
||||
url: '/import',
|
||||
controller: 'AgendaImportCtrl',
|
||||
})
|
||||
.state('agenda.current-list-of-speakers', {
|
||||
url: '/speakers',
|
||||
controller: 'ListOfSpeakersViewCtrl',
|
||||
resolve: {
|
||||
users: function(User) {
|
||||
return User.findAll().catch(
|
||||
function () {
|
||||
return null;
|
||||
}
|
||||
);
|
||||
},
|
||||
items: function(Agenda) {
|
||||
return Agenda.findAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
])
|
||||
@ -546,6 +562,63 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
}
|
||||
])
|
||||
|
||||
.controller('ListOfSpeakersViewCtrl', [
|
||||
'$scope',
|
||||
'$state',
|
||||
'$http',
|
||||
'Projector',
|
||||
'Assignment',
|
||||
'Customslide',
|
||||
'Motion',
|
||||
'Agenda',
|
||||
function($scope, $state, $http, Projector, Assignment, Customslide, Motion, Agenda) {
|
||||
$scope.$watch(
|
||||
function() {
|
||||
return Projector.lastModified(1);
|
||||
},
|
||||
function() {
|
||||
Projector.find(1).then( function(projector) {
|
||||
$scope.AgendaItem = null;
|
||||
_.forEach(projector.elements, function(element) {
|
||||
switch(element.name) {
|
||||
case 'motions/motion':
|
||||
Motion.find(element.id).then(function(motion) {
|
||||
Motion.loadRelations(motion, 'agenda_item').then(function() {
|
||||
$scope.AgendaItem = motion.agenda_item;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'core/customslide':
|
||||
Customslide.find(element.id).then(function(customslide) {
|
||||
Customslide.loadRelations(customslide, 'agenda_item').then(function() {
|
||||
$scope.AgendaItem = customslide.agenda_item;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'assignments/assignment':
|
||||
Assignment.find(element.id).then(function(assignment) {
|
||||
Assignment.loadRelations(assignment, 'agenda_item').then(function() {
|
||||
$scope.AgendaItem = assignment.agenda_item;
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'agenda/list-of-speakers':
|
||||
Agenda.find(element.id).then(function(item) {
|
||||
$scope.AgendaItem = item;
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
// go to the list of speakers (management) of the currently
|
||||
// displayed projector slide
|
||||
$scope.goToListOfSpeakers = function() {
|
||||
$state.go('agenda.item.detail', {id: $scope.AgendaItem.id});
|
||||
};
|
||||
}
|
||||
])
|
||||
|
||||
//mark all agenda config strings for translation with Javascript
|
||||
.config([
|
||||
'gettext',
|
||||
|
@ -0,0 +1,48 @@
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<div class="submenu">
|
||||
<button ng-click="isFullScreen = !isFullScreen"
|
||||
class="btn btn-sm btn-default">
|
||||
<i class="fa fa-plus fa-lg"></i>
|
||||
<translate>Fullscreen</translate>
|
||||
</button>
|
||||
<button os-perms="agenda.can_manage"
|
||||
ng-click="goToListOfSpeakers()"
|
||||
class="btn btn-sm btn-default">
|
||||
<i class="fa fa-microphone"></i>
|
||||
<translate>Manage list</translate>
|
||||
</button>
|
||||
</div>
|
||||
<h1 translate>List of speakers</h1>
|
||||
<h2> {{ AgendaItem.getTitle() }}
|
||||
<span class="slimlabel label label-danger ng-scope" style="" ng-if="AgendaItem.speaker_list_closed" translate>
|
||||
Closed
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="content" ng-class="isFullScreen ? 'fullscreendiv' : 'details'"
|
||||
ng-click="isFullScreen? (isFullScreen = !isFullScreen) : a">
|
||||
<div ng-if="isFullScreen" class="fullscreendiv-title">
|
||||
<h1 translate>List of speakers</h1>
|
||||
<h2> {{ AgendaItem.getTitle() }}
|
||||
<span class="slimlabel label label-danger ng-scope" style=""
|
||||
ng-if="AgendaItem.speaker_list_closed" translate>Closed</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="content">
|
||||
<!-- Last speakers -->
|
||||
<p ng-repeat="speaker in lastSpeakers = (AgendaItem.speakers | filter: {end_time: '!!', begin_time: '!!'}) |
|
||||
limitTo: config('agenda_show_last_speakers') : (lastSpeakers.length - config('agenda_show_last_speakers'))" class="lastSpeakers">
|
||||
{{ speaker.user.get_full_name() }}
|
||||
<!-- Current speaker -->
|
||||
<p ng-repeat="speaker in currentspeakers = (AgendaItem.speakers| filter: {end_time: null, begin_time: '!!'})"
|
||||
class="currentSpeaker">
|
||||
<i class="fa fa-microphone fa-lg"></i> {{ speaker.user.get_full_name() }}
|
||||
<!-- Next speakers -->
|
||||
<ol class="nextSpeakers">
|
||||
<li ng-repeat="speaker in AgendaItem.speakers | filter: {begin_time: null} | orderBy:'weight'">
|
||||
{{ speaker.user.get_full_name() }}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
@ -66,6 +66,12 @@
|
||||
<i class="fa fa-sort-numeric-asc"></i>
|
||||
<translate>Numbering</translate>
|
||||
</a>
|
||||
<!--current list of speakers button-->
|
||||
<a os-perms="users.can_see_name" class="btn btn-default"
|
||||
ui-sref="agenda.current-list-of-speakers">
|
||||
<i class="fa fa-microphone"></i>
|
||||
<translate>List of speakers</translate>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
|
@ -834,6 +834,49 @@ img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* List of speakers view */
|
||||
.fullscreendiv {
|
||||
position: absolute;
|
||||
font-size:120%;
|
||||
top:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
left:0;
|
||||
padding: 50px;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.fullscreendiv-title {
|
||||
border-bottom: 5px solid #d3d3d3;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.lastSpeakers {
|
||||
color: #9a9898;
|
||||
margin-left: 27px;
|
||||
}
|
||||
|
||||
.currentSpeaker {
|
||||
font-weight: bold;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.currentSpeaker i {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.nextSpeakers {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.nextSpeakers li {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
/* search results */
|
||||
.searchresults li {
|
||||
margin-bottom: 12px;
|
||||
|
Loading…
Reference in New Issue
Block a user