From da37f3a441ecf9708d56f8476c1be3b4dafcda02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Fri, 11 Dec 2015 15:35:41 +0100 Subject: [PATCH] Removed item detail slide on server and client side. There is now only a list of speakers slide. --- openslides/agenda/projector.py | 7 ++-- openslides/agenda/static/js/agenda/base.js | 10 +++--- .../agenda/static/js/agenda/projector.js | 2 -- openslides/agenda/static/js/agenda/site.js | 4 +-- .../templates/agenda/slide-item-detail.html | 33 ++++++++----------- 5 files changed, 22 insertions(+), 34 deletions(-) diff --git a/openslides/agenda/projector.py b/openslides/agenda/projector.py index ad34f4fc1..26dbab12a 100644 --- a/openslides/agenda/projector.py +++ b/openslides/agenda/projector.py @@ -44,10 +44,7 @@ class ItemDetailSlide(ProjectorElement): """ Slide definitions for Item model. - This is only for detail slides. You have to set 'id'. - - To activate a detail slide as list of speakers slide, set 'id' and set - 'list_of_speakers' true. + This is only for list of speakers slide. You have to set 'id'. """ name = 'agenda/item' @@ -61,7 +58,7 @@ class ItemDetailSlide(ProjectorElement): def get_requirements(self, config_entry): pk = config_entry.get('id') if pk is not None: - # Detail slide. + # List of speakers slide. try: item = Item.objects.get(pk=pk) except Item.DoesNotExist: diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index 40053d9e7..85dbe5f79 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -80,20 +80,20 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users']) projectListOfSpeakers: function() { return $http.post( '/rest/core/projector/1/prune_elements/', - [{name: 'agenda/item', id: this.id, list_of_speakers: true}] + [{name: 'agenda/item', id: this.id}] ); }, // check if list of speakers is projected isListOfSpeakersProjected: function () { - // Returns true if there is a projector element with the same - // name and agenda is active. + // Returns true if there is a projector element with the + // name 'agenda/item' and the same id. var projector = Projector.get(1); if (typeof projector === 'undefined') return false; var self = this; var predicate = function (element) { return element.name == 'agenda/item' && - element.id == self.id && - element.list_of_speakers; + typeof element.id !== 'undefined' && + element.id == self.id; }; return typeof _.findKey(projector.elements, predicate) === 'string'; } diff --git a/openslides/agenda/static/js/agenda/projector.js b/openslides/agenda/static/js/agenda/projector.js index 47aa97343..505692c2d 100644 --- a/openslides/agenda/static/js/agenda/projector.js +++ b/openslides/agenda/static/js/agenda/projector.js @@ -28,8 +28,6 @@ angular.module('OpenSlidesApp.agenda.projector', ['OpenSlidesApp.agenda']) Agenda.find(id); User.findAll(); Agenda.bindOne(id, $scope, 'item'); - // get flag for list-of-speakers-slide (true/false) - $scope.is_list_of_speakers = $scope.element.list_of_speakers; } ]) diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 075c55d1c..0a1de99e3 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -163,8 +163,8 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda']) }; // check if agenda is projected $scope.isAgendaProjected = function () { - // Returns true if there is a projector element with the same - // name and agenda is active. + // Returns true if there is a projector element with the name + // 'agenda/item-list'. var projector = Projector.get(1); if (typeof projector === 'undefined') return false; var self = this; diff --git a/openslides/agenda/static/templates/agenda/slide-item-detail.html b/openslides/agenda/static/templates/agenda/slide-item-detail.html index 1cc52272a..768052c9a 100644 --- a/openslides/agenda/static/templates/agenda/slide-item-detail.html +++ b/openslides/agenda/static/templates/agenda/slide-item-detail.html @@ -1,27 +1,20 @@

{{ item.title }} - - List of speakers - Closed - + List of speakers + Closed

- -
{{ item.text }}
- -
- + - -

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

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

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

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