New style for motion agenda title and list of speakers
Improved list of speakers slide title: - h2 subtitle: use always motion identifier only (like in motion slides) - h1 title: use always "list of speakers" (long motion title not useful if an other projector shows the motion slide with full title (identifier is enough)
This commit is contained in:
parent
2497969864
commit
754040570d
@ -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;
|
||||
}
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
<!-- Title -->
|
||||
<div id="title">
|
||||
<h1>{{ agendaItem.getTitle() }}</h1>
|
||||
<h2>
|
||||
<span translate>List of speakers</span>
|
||||
<h1 translate>List of speakers</h1>
|
||||
<h2>{{ agendaItem.getListOfSpeakersTitle() }}
|
||||
<span ng-if="(agendaItem.speakers | filter: {begin_time: null}).length > 0">
|
||||
– {{ (agendaItem.speakers | filter: {begin_time: null}).length }} <translate>speakers</translate>
|
||||
– {{ (agendaItem.speakers | filter: {begin_time: null}).length }} <translate>speakers</translate>
|
||||
</span>
|
||||
<span ng-if="agendaItem.speaker_list_closed" class="slimlabel label label-danger" translate>Closed</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
@ -18,7 +18,7 @@
|
||||
</td>
|
||||
<td ng-if="!node.item.closed">
|
||||
<p ng-class="{mainitem: node.item.parent_id === null, subitem: node.item.parent_id !== null}">
|
||||
{{ node.item.title }}
|
||||
{{ node.item.getProjectorTitle() }}
|
||||
</p>
|
||||
<table ng-if="node.children.length" class="agendalist-table">
|
||||
<tr ng-repeat="node in node.children" ng-include="'projector_agenda_renderer.html'"></tr>
|
||||
|
@ -2,11 +2,12 @@
|
||||
|
||||
<!-- Title -->
|
||||
<div id="title">
|
||||
<h1>{{ item.getTitle() }}</h1>
|
||||
<h1 translate>List of speakers</h1>
|
||||
<h2>
|
||||
<span translate>List of speakers</span>
|
||||
{{ item.getListOfSpeakersTitle() }}
|
||||
<span ng-if="(item.speakers | filter: {begin_time: null}).length > 0">
|
||||
– {{ (item.speakers | filter: {begin_time: null}).length }} <translate>speakers</translate>
|
||||
– {{ (item.speakers | filter: {begin_time: null}).length }} <translate>speakers</translate>
|
||||
</span>
|
||||
<span ng-if="item.speaker_list_closed" class="slimlabel label label-danger" translate>Closed</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user