Enable/disable category in motion PDF.

This commit is contained in:
Emanuel Schütze 2018-08-24 14:00:53 +02:00
parent 96637e18c4
commit 6c2fbf7389
2 changed files with 13 additions and 3 deletions

View File

@ -135,7 +135,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
}
// category
if (motion.category) {
if (params.include.category && motion.category) {
metaTableBody.push([
{
text: gettextCatalog.getString('Category') + ':',
@ -321,6 +321,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
margin: [0, 0, 0, 20],
layout: '{{motion-placeholder-to-insert-functions-here}}'
};
params.include.metatable = true;
return metaTable;
} else {
return {};
@ -329,11 +330,13 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
// motion title
var motionTitle = function() {
if (params.include.text && !motion.isParagraphBasedAmendment()) {
if (params.include.metatable && params.include.text && !motion.isParagraphBasedAmendment()) {
return [{
text: titlePlain,
style: 'heading3'
}];
} else {
return {};
}
};

View File

@ -852,10 +852,17 @@ angular.module('OpenSlidesApp.motions.site', [
disabled = {};
}
var options = [
{name: gettextCatalog.getString('State'), id: 'state', disabled: disabled.state},
{name: gettextCatalog.getString('Submitters'), id: 'submitters', disabled: disabled.submitters},
{name: gettextCatalog.getString('State'), id: 'state', disabled: disabled.state},
{name: gettextCatalog.getString('Voting result'), id: 'votingresult', disabled: disabled.votingResult}
];
if (_.some(motions, function (motion) { return motion.category; })) {
options.push({
name: gettextCatalog.getString('Category'),
id: 'category',
disabled: disabled.category,
});
}
if (_.some(motions, function (motion) { return motion.motionBlock; })) {
options.push({
name: gettextCatalog.getString('Motion block'),