Merge pull request #3702 from FinnStutzenstein/motionAgendaTitle
new style for motion agenda title
This commit is contained in:
commit
cc5a1ea0fe
@ -69,6 +69,18 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
|
|||||||
}
|
}
|
||||||
return title;
|
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 () {
|
getAgendaTitle: function () {
|
||||||
return this.title;
|
return this.title;
|
||||||
},
|
},
|
||||||
@ -99,14 +111,16 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getListViewTitle: function () {
|
getProjectorTitle: function () {
|
||||||
var title;
|
|
||||||
try {
|
try {
|
||||||
title = this.getContentObject().getAgendaListViewTitle();
|
return this.getContentObject().getAgendaListViewTitle();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// when the content object is not in the DS store
|
// 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) {
|
if (this.item_number) {
|
||||||
title = this.item_number + ' · ' + title;
|
title = this.item_number + ' · ' + title;
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<h1>{{ agendaItem.getTitle() }}</h1>
|
<h1 translate>List of speakers</h1>
|
||||||
<h2>
|
<h2>{{ agendaItem.getListOfSpeakersTitle() }}
|
||||||
<span translate>List of speakers</span>
|
|
||||||
<span ng-if="(agendaItem.speakers | filter: {begin_time: null}).length > 0">
|
<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>
|
<span ng-if="agendaItem.speaker_list_closed" class="slimlabel label label-danger" translate>Closed</span>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td ng-if="!node.item.closed">
|
<td ng-if="!node.item.closed">
|
||||||
<p ng-class="{mainitem: node.item.parent_id === null, subitem: node.item.parent_id !== null}">
|
<p ng-class="{mainitem: node.item.parent_id === null, subitem: node.item.parent_id !== null}">
|
||||||
{{ node.item.title }}
|
{{ node.item.getProjectorTitle() }}
|
||||||
</p>
|
</p>
|
||||||
<table ng-if="node.children.length" class="agendalist-table">
|
<table ng-if="node.children.length" class="agendalist-table">
|
||||||
<tr ng-repeat="node in node.children" ng-include="'projector_agenda_renderer.html'"></tr>
|
<tr ng-repeat="node in node.children" ng-include="'projector_agenda_renderer.html'"></tr>
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div id="title">
|
<div id="title">
|
||||||
<h1>{{ item.getTitle() }}</h1>
|
<h1 translate>List of speakers</h1>
|
||||||
<h2>
|
<h2>
|
||||||
<span translate>List of speakers</span>
|
{{ item.getListOfSpeakersTitle() }}
|
||||||
<span ng-if="(item.speakers | filter: {begin_time: null}).length > 0">
|
<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>
|
<span ng-if="item.speaker_list_closed" class="slimlabel label label-danger" translate>Closed</span>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
@ -654,9 +654,9 @@ class Motion(RESTModelMixin, models.Model):
|
|||||||
Note: It has to be the same return value like in JavaScript.
|
Note: It has to be the same return value like in JavaScript.
|
||||||
"""
|
"""
|
||||||
if self.identifier:
|
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:
|
else:
|
||||||
string = '%s (%s)' % (self.title, _(self._meta.verbose_name))
|
string = '%s (%s)' % (_(self._meta.verbose_name), self.title)
|
||||||
return string
|
return string
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -265,11 +265,21 @@ angular.module('OpenSlidesApp.motions', [
|
|||||||
return this.getVersion(versionId).title;
|
return this.getVersion(versionId).title;
|
||||||
},
|
},
|
||||||
getAgendaTitle: function () {
|
getAgendaTitle: function () {
|
||||||
var title = '';
|
var title = gettextCatalog.getString('Motion');
|
||||||
if (this.identifier) {
|
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;
|
return title;
|
||||||
},
|
},
|
||||||
getTitleWithChanges: function (changeRecommendationMode, versionId) {
|
getTitleWithChanges: function (changeRecommendationMode, versionId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user