From c65976715e62545157c8e31bb81df56e8e11dacb Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Wed, 26 Jul 2017 14:50:10 +0200 Subject: [PATCH] configvalue for sequential number --- openslides/core/static/css/projector.css | 2 +- openslides/motions/config_variables.py | 9 +++++++++ openslides/motions/static/js/motions/docx.js | 2 ++ openslides/motions/static/js/motions/pdf.js | 12 ++++++++---- openslides/motions/static/js/motions/site.js | 7 ++++--- .../static/templates/docx/motions.docx | Bin 7609 -> 7631 bytes 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/openslides/core/static/css/projector.css b/openslides/core/static/css/projector.css index d13746d09..ef5d7ec04 100644 --- a/openslides/core/static/css/projector.css +++ b/openslides/core/static/css/projector.css @@ -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; diff --git a/openslides/motions/config_variables.py b/openslides/motions/config_variables.py index 1ce8190bf..6b5e16788 100644 --- a/openslides/motions/config_variables.py +++ b/openslides/motions/config_variables.py @@ -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') diff --git a/openslides/motions/static/js/motions/docx.js b/openslides/motions/static/js/motions/docx.js index ede74639f..c6044cbba 100644 --- a/openslides/motions/static/js/motions/docx.js +++ b/openslides/motions/static/js/motions/docx.js @@ -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, diff --git a/openslides/motions/static/js/motions/pdf.js b/openslides/motions/static/js/motions/pdf.js index 205bcbca9..8c9394455 100644 --- a/openslides/motions/static/js/motions/pdf.js +++ b/openslides/motions/static/js/motions/pdf.js @@ -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 diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index f20837f2d..c5b5c0252 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -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'); diff --git a/openslides/motions/static/templates/docx/motions.docx b/openslides/motions/static/templates/docx/motions.docx index 4f773b9028e30aaa60461826c1b94c7bf79911d1..060d13c9039e80d931eadbf8eb76dd414445b878 100644 GIT binary patch delta 2559 zcmZ8jc{CJi8z1|O?9C-+>=O#vvlhbGmrKYV##R~9BwHp^*|HB4Nehvfu?-E8$-aez zv5kvlNw$$?$kmO$(|5n`{pa^P&-**i`<&l-p7XqQ+Wp#`Hs(ysU;q#Z1St9LRdRAO zF#SZLD1-DbV#;{p7eO$^{vs>P#cW5KY!32K1nbNNLpudcXz)Z&d3YB06XbT|1BU`g zU9Ta}^v59n?uGLYeC0S2QorS9*{#>rWGLs1g<5T5PHMz9rqO_=VRPm# z*vIoX#*k#)*P2Bpm+~0>&n(Zv$0lq7K`GS}t&acBy zeHEGE))yXHpLq+sgY+GV?<1)5cpW5SZM1NNH%6GKv}1ecIHVX-R(UXMzOfe)#8sha zQaM{lZwlF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