From 39bd6653f093599b8d66901c6aab11f6982a53b6 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Fri, 13 Oct 2017 08:02:55 +0200 Subject: [PATCH] Show motion identifier in (current) list of speakers --- CHANGELOG | 1 + openslides/agenda/projector.py | 2 ++ openslides/agenda/static/js/agenda/site.js | 10 +++++++++- openslides/motions/static/js/motions/base.js | 8 ++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5ce071a13..55d13353b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,6 +44,7 @@ Motions: - Added support for pinning personal notes to the window [#3360]. - Clear identifier on state reset [#3356]. - New config options to hide reason and recommendation on projector [#3432]. +- Show motion identifier in (current) list of speakers [#3442] Elections: - Added pagination for list view [#3393]. diff --git a/openslides/agenda/projector.py b/openslides/agenda/projector.py index 0dd6df0ec..6a7b73c6e 100644 --- a/openslides/agenda/projector.py +++ b/openslides/agenda/projector.py @@ -54,6 +54,7 @@ class ListOfSpeakersSlide(ProjectorElement): pass else: yield item + yield item.content_object for speaker in item.speakers.filter(end_time=None): # Yield current speaker and next speakers yield speaker.user @@ -96,6 +97,7 @@ class CurrentListOfSpeakersSlide(ProjectorElement): items = self.get_agenda_items(reference_projector) for item in items: yield item + yield item.content_object for speaker in item.speakers.filter(end_time=None): yield speaker.user query = (item.speakers.exclude(end_time=None) diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 1e497cb68..085cf4337 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -618,8 +618,10 @@ angular.module('OpenSlidesApp.agenda.site', [ 'Config', 'CurrentListOfSpeakersItem', 'CurrentListOfSpeakersSlide', + 'gettextCatalog', + 'WebpageTitle', function($scope, $http, $filter, Projector, ProjectionDefault, Agenda, Config, - CurrentListOfSpeakersItem, CurrentListOfSpeakersSlide) { + CurrentListOfSpeakersItem, CurrentListOfSpeakersSlide, gettextCatalog, WebpageTitle) { $scope.alert = {}; $scope.currentListOfSpeakers = CurrentListOfSpeakersSlide; @@ -667,6 +669,12 @@ angular.module('OpenSlidesApp.agenda.site', [ $scope.currentSpeaker = void 0; $scope.lastSpeakers = void 0; } + if ($scope.item) { + WebpageTitle.updateTitle(gettextCatalog.getString('Current list of speakers') + ' ' + + gettextCatalog.getString('of') + ' ' + $scope.item.getTitle()); + } else { + WebpageTitle.updateTitle(gettextCatalog.getString('Current list of speakers')); + } }; // Set the current overlay status diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index 573a86e89..59188a3f6 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -235,6 +235,14 @@ angular.module('OpenSlidesApp.motions', [ getTitle: function (versionId) { return this.getVersion(versionId).title; }, + getAgendaTitle: function () { + var title = ''; + if (this.identifier) { + title = gettextCatalog.getString('Motion') + ' ' + this.identifier + ': '; + } + title += this.getTitle(); + return title; + }, getText: function (versionId) { return this.getVersion(versionId).text; },