Merge pull request #3324 from FinnStutzenstein/configvalue-for-id
Configvalue for sequential number
This commit is contained in:
commit
7f20a7d358
@ -213,7 +213,7 @@ h3 {
|
||||
#sidebox {
|
||||
width: 260px;
|
||||
float: right;
|
||||
margin: 44px -50px 20px 10px;
|
||||
margin: 75px -50px 20px 10px;
|
||||
right: 0;
|
||||
background: #d3d3d3;
|
||||
border-radius: 7px 0 0 7px;
|
||||
|
@ -265,3 +265,12 @@ def get_config_variables():
|
||||
weight=380,
|
||||
group='Motions',
|
||||
subgroup='Export')
|
||||
|
||||
yield ConfigVariable(
|
||||
name='motions_export_sequential_number',
|
||||
default_value=True,
|
||||
input_type='boolean',
|
||||
label='Include the sequential number in PDF and DOCX',
|
||||
weight=385,
|
||||
group='Motions',
|
||||
subgroup='Export')
|
||||
|
@ -92,6 +92,7 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
|
||||
status_translation = gettextCatalog.getString('Status'),
|
||||
reason_translation = gettextCatalog.getString('Reason'),
|
||||
comment_translation = gettextCatalog.getString('Comments');
|
||||
var sequential_enabled = Config.get('motions_export_sequential_number').value;
|
||||
// promises for create the actual motion data
|
||||
var promises = _.map(motions, function (motion) {
|
||||
var text = motion.getTextByMode(params.changeRecommendationMode, null, null, false);
|
||||
@ -107,6 +108,7 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
|
||||
reason_translation: reason.length === 0 ? '' : reason_translation,
|
||||
status_translation: status_translation,
|
||||
comment_translation: comments.length === 0 ? '' : comment_translation,
|
||||
sequential_enabled: sequential_enabled,
|
||||
// Actual data
|
||||
id: motion.id,
|
||||
identifier: motion.identifier,
|
||||
|
@ -44,7 +44,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
||||
motion.getTitle(motionVersion)
|
||||
);
|
||||
|
||||
// subtitle
|
||||
// subtitle and sequential number
|
||||
var subtitleLines = [];
|
||||
if (motion.parent_id) {
|
||||
var parentMotion = Motion.get(motion.parent_id);
|
||||
@ -53,7 +53,9 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
||||
(parentMotion.identifier ? parentMotion.identifier : parentMotion.getTitle())
|
||||
);
|
||||
}
|
||||
subtitleLines.push(gettextCatalog.getString('Sequential number') + ': ' + motion.id);
|
||||
if (Config.get('motions_export_sequential_number').value) {
|
||||
subtitleLines.push(gettextCatalog.getString('Sequential number') + ': ' + motion.id);
|
||||
}
|
||||
var subtitle = PDFLayout.createSubtitle(subtitleLines);
|
||||
|
||||
// meta data table
|
||||
@ -408,7 +410,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
||||
gettextCatalog.getString('Motion') + identifier + ': ' + motion.getTitle()
|
||||
);
|
||||
|
||||
// subtitle
|
||||
// subtitle and sequential number
|
||||
var subtitleLines = [];
|
||||
if (motion.parent_id) {
|
||||
var parentMotion = Motion.get(motion.parent_id);
|
||||
@ -417,7 +419,9 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
||||
(parentMotion.identifier ? parentMotion.identifier : parentMotion.getTitle())
|
||||
);
|
||||
}
|
||||
subtitleLines.push(gettextCatalog.getString('Sequential number') + ': ' + motion.id);
|
||||
if (Config.get('motions_export_sequential_number').value) {
|
||||
subtitleLines.push(gettextCatalog.getString('Sequential number') + ': ' + motion.id);
|
||||
}
|
||||
var subtitle = PDFLayout.createSubtitle(subtitleLines);
|
||||
|
||||
// meta data table
|
||||
|
@ -975,7 +975,7 @@ angular.module('OpenSlidesApp.motions.site', [
|
||||
'submitters' : function (submitter) {
|
||||
return submitter.get_short_name();
|
||||
},
|
||||
'supporters' : function (submitter) {
|
||||
'supporters' : function (supporter) {
|
||||
return supporter.get_short_name();
|
||||
},
|
||||
'tags' : function (tag) {
|
||||
@ -2224,7 +2224,7 @@ angular.module('OpenSlidesApp.motions.site', [
|
||||
gettext('Apply text for new amendments');
|
||||
gettext('The title of the motion is always applied.');
|
||||
|
||||
// subgroup Suppoerters
|
||||
// subgroup Supporters
|
||||
gettext('Supporters');
|
||||
gettext('Number of (minimum) required supporters for a motion');
|
||||
gettext('Choose 0 to disable the supporting system.');
|
||||
@ -2257,10 +2257,11 @@ angular.module('OpenSlidesApp.motions.site', [
|
||||
gettext('Use the following custom number');
|
||||
gettext('Custom number of ballot papers');
|
||||
|
||||
// subgroup PDF
|
||||
// subgroup PDF and DOCX
|
||||
gettext('Title for PDF and DOCX documents (all motions)');
|
||||
gettext('Preamble text for PDF and DOCX documents (all motions)');
|
||||
gettext('Sort categories by');
|
||||
gettext('Include the sequential number in PDF and DOCX');
|
||||
|
||||
// misc strings (used dynamically in templates by translate filter)
|
||||
gettext('needed');
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user