Merge pull request #3442 from FinnStutzenstein/MotionIdentifierInTitle

Show motion identifier in (current) list of speakers
This commit is contained in:
Emanuel Schütze 2017-11-01 10:23:19 +01:00 committed by GitHub
commit a8ff32bbb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1 deletions

View File

@ -44,6 +44,7 @@ Motions:
- Added support for pinning personal notes to the window [#3360]. - Added support for pinning personal notes to the window [#3360].
- Clear identifier on state reset [#3356]. - Clear identifier on state reset [#3356].
- New config options to hide reason and recommendation on projector [#3432]. - New config options to hide reason and recommendation on projector [#3432].
- Show motion identifier in (current) list of speakers [#3442]
Elections: Elections:
- Added pagination for list view [#3393]. - Added pagination for list view [#3393].

View File

@ -54,6 +54,7 @@ class ListOfSpeakersSlide(ProjectorElement):
pass pass
else: else:
yield item yield item
yield item.content_object
for speaker in item.speakers.filter(end_time=None): for speaker in item.speakers.filter(end_time=None):
# Yield current speaker and next speakers # Yield current speaker and next speakers
yield speaker.user yield speaker.user
@ -96,6 +97,7 @@ class CurrentListOfSpeakersSlide(ProjectorElement):
items = self.get_agenda_items(reference_projector) items = self.get_agenda_items(reference_projector)
for item in items: for item in items:
yield item yield item
yield item.content_object
for speaker in item.speakers.filter(end_time=None): for speaker in item.speakers.filter(end_time=None):
yield speaker.user yield speaker.user
query = (item.speakers.exclude(end_time=None) query = (item.speakers.exclude(end_time=None)

View File

@ -618,8 +618,10 @@ angular.module('OpenSlidesApp.agenda.site', [
'Config', 'Config',
'CurrentListOfSpeakersItem', 'CurrentListOfSpeakersItem',
'CurrentListOfSpeakersSlide', 'CurrentListOfSpeakersSlide',
'gettextCatalog',
'WebpageTitle',
function($scope, $http, $filter, Projector, ProjectionDefault, Agenda, Config, function($scope, $http, $filter, Projector, ProjectionDefault, Agenda, Config,
CurrentListOfSpeakersItem, CurrentListOfSpeakersSlide) { CurrentListOfSpeakersItem, CurrentListOfSpeakersSlide, gettextCatalog, WebpageTitle) {
$scope.alert = {}; $scope.alert = {};
$scope.currentListOfSpeakers = CurrentListOfSpeakersSlide; $scope.currentListOfSpeakers = CurrentListOfSpeakersSlide;
@ -667,6 +669,12 @@ angular.module('OpenSlidesApp.agenda.site', [
$scope.currentSpeaker = void 0; $scope.currentSpeaker = void 0;
$scope.lastSpeakers = 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 // Set the current overlay status

View File

@ -235,6 +235,14 @@ angular.module('OpenSlidesApp.motions', [
getTitle: function (versionId) { getTitle: function (versionId) {
return this.getVersion(versionId).title; 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) { getText: function (versionId) {
return this.getVersion(versionId).text; return this.getVersion(versionId).text;
}, },