diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 854c6bda0..23295162c 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -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', diff --git a/openslides/agenda/static/templates/agenda/current-list-of-speakers.html b/openslides/agenda/static/templates/agenda/current-list-of-speakers.html new file mode 100644 index 000000000..ef55642b4 --- /dev/null +++ b/openslides/agenda/static/templates/agenda/current-list-of-speakers.html @@ -0,0 +1,48 @@ +
+
+ +

List of speakers

+

{{ AgendaItem.getTitle() }} + + Closed + +

+
+ +
+
+

List of speakers

+

{{ AgendaItem.getTitle() }} + Closed +

+
+
+ +

+ {{ speaker.user.get_full_name() }} + +

+ {{ speaker.user.get_full_name() }} + +

    +
  1. + {{ speaker.user.get_full_name() }} +
+
+
diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index 0536a2a7c..07e5c5837 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -66,6 +66,12 @@ Numbering + + + + List of speakers +
diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index c0392c4c0..4c20c4ce5 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -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;