diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index f5a002e59..0eb0994e0 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -67,6 +67,18 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users']) } return title; }, + getListOfSpeakersTitle: function () { + var title; + try { + title = this.getContentObject().getListOfSpeakersTitle(); + if (this.item_number) { + title = this.item_number + ' · ' + title; + } + } catch (e) { + title = this.getTitle(); + } + return title; + }, getAgendaTitle: function () { return this.title; }, @@ -97,14 +109,16 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users']) } }); }, - getListViewTitle: function () { - var title; + getProjectorTitle: function () { try { - title = this.getContentObject().getAgendaListViewTitle(); + return this.getContentObject().getAgendaListViewTitle(); } catch (e) { // when the content object is not in the DS store - title = this.list_view_title; + return this.list_view_title; } + }, + getListViewTitle: function () { + var title = this.getProjectorTitle(); if (this.item_number) { title = this.item_number + ' · ' + title; } diff --git a/openslides/agenda/static/templates/agenda/partial-slide-current-list-of-speakers.html b/openslides/agenda/static/templates/agenda/partial-slide-current-list-of-speakers.html index 18d2bf1b7..2020d3727 100644 --- a/openslides/agenda/static/templates/agenda/partial-slide-current-list-of-speakers.html +++ b/openslides/agenda/static/templates/agenda/partial-slide-current-list-of-speakers.html @@ -2,11 +2,11 @@
-

{{ agendaItem.getTitle() }}

-

- List of speakers +

List of speakers

+

{{ agendaItem.getListOfSpeakersTitle() }} - – {{ (agendaItem.speakers | filter: {begin_time: null}).length }} speakers + – {{ (agendaItem.speakers | filter: {begin_time: null}).length }} speakers + Closed

diff --git a/openslides/agenda/static/templates/agenda/slide-item-list.html b/openslides/agenda/static/templates/agenda/slide-item-list.html index 86ec80868..c9fc98b0b 100644 --- a/openslides/agenda/static/templates/agenda/slide-item-list.html +++ b/openslides/agenda/static/templates/agenda/slide-item-list.html @@ -18,7 +18,7 @@

- {{ node.item.title }} + {{ node.item.getProjectorTitle() }}

diff --git a/openslides/agenda/static/templates/agenda/slide-list-of-speakers.html b/openslides/agenda/static/templates/agenda/slide-list-of-speakers.html index a953feeb1..c2b9371d0 100644 --- a/openslides/agenda/static/templates/agenda/slide-list-of-speakers.html +++ b/openslides/agenda/static/templates/agenda/slide-list-of-speakers.html @@ -2,11 +2,12 @@
-

{{ item.getTitle() }}

+

List of speakers

- List of speakers + {{ item.getListOfSpeakersTitle() }} - – {{ (item.speakers | filter: {begin_time: null}).length }} speakers + – {{ (item.speakers | filter: {begin_time: null}).length }} speakers + Closed

diff --git a/openslides/motions/models.py b/openslides/motions/models.py index 40925771a..0f5fc73c0 100644 --- a/openslides/motions/models.py +++ b/openslides/motions/models.py @@ -654,9 +654,9 @@ class Motion(RESTModelMixin, models.Model): Note: It has to be the same return value like in JavaScript. """ if self.identifier: - string = '%s (%s %s)' % (self.title, _(self._meta.verbose_name), self.identifier) + string = '%s %s' % (_(self._meta.verbose_name), self.identifier) else: - string = '%s (%s)' % (self.title, _(self._meta.verbose_name)) + string = '%s (%s)' % (_(self._meta.verbose_name), self.title) return string @property diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index a874aa630..df8c3ee1c 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -265,11 +265,21 @@ angular.module('OpenSlidesApp.motions', [ return this.getVersion(versionId).title; }, getAgendaTitle: function () { - var title = ''; + var title = gettextCatalog.getString('Motion'); if (this.identifier) { - title = gettextCatalog.getString('Motion') + ' ' + this.identifier + ': '; + title += ' ' + this.identifier; + } else { + title += ' (' + this.getTitle() + ')'; + } + return title; + }, + getListOfSpeakersTitle: function () { + var title = gettextCatalog.getString('Motion'); + if (this.identifier) { + title += ' ' + this.identifier; + } else { + title += ' (' + this.getTitle() + ')'; } - title += this.getTitle(); return title; }, getTitleWithChanges: function (changeRecommendationMode, versionId) {