From 986e8cc4f6102cfa82a407ba9ea5d6e6b04f92a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Sat, 14 Jan 2017 13:54:40 +0100 Subject: [PATCH] Adapted motion DOCX template (Fixed #2763). --- openslides/motions/static/js/motions/docx.js | 44 +++++++++++------- .../static/templates/docx/motions.docx | Bin 7100 -> 7506 bytes 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/openslides/motions/static/js/motions/docx.js b/openslides/motions/static/js/motions/docx.js index 1720903ac..1065ca8a1 100644 --- a/openslides/motions/static/js/motions/docx.js +++ b/openslides/motions/static/js/motions/docx.js @@ -23,24 +23,33 @@ angular.module('OpenSlidesApp.motions.docx', []) var getData = function (motions, categories) { var data = {}; - data.title = Config.get('motions_export_title').value; + // header + var headerline1 = [ + Config.translate(Config.get('general_event_name').value), + Config.translate(Config.get('general_event_description').value) + ].filter(Boolean).join(' – '); + var headerline2 = [ + Config.get('general_event_location').value, + Config.get('general_event_date').value + ].filter(Boolean).join(', '); + data.header = [headerline1, headerline2].join('\n'); + + // motion catalog title/preamble + data.title = Config.translate(Config.get('motions_export_title').value); data.preamble = Config.get('motions_export_preamble').value; - data.date = function () { - var today = new Date(); - var d = today.getDate(); - var m = today.getMonth()+1; //January is 0! - var y = today.getFullYear(); - if (d<10) { d='0'+d; } - if (m<10) { m='0'+m; } - return d+'.'+m+'.'+y; - }(); - data.pagebreak_main = motions.length === 0 ? '' : PAGEBREAK; + + // categories + data.has_categories = categories.length === 0 ? false : true; data.categories_translation = gettextCatalog.getString('Categories'); - data.no_categories = gettextCatalog.getString('No categories available.'); - data.no_motions = gettextCatalog.getString('No motions available.'); data.categories = getCategoriesData(categories); - data.motions_list = getMotionShortData(motions); + data.no_categories = gettextCatalog.getString('No categories available.'); + data.pagebreak_main = categories.length === 0 ? '' : PAGEBREAK; + + // motions + data.tableofcontents_translation = gettextCatalog.getString('Table of contents'); data.motions = getMotionFullData(motions); + data.motions_list = getMotionShortData(motions); + data.no_motions = gettextCatalog.getString('No motions available.'); return data; }; @@ -55,10 +64,8 @@ angular.module('OpenSlidesApp.motions.docx', []) }; var getMotionShortData = function (motions) { - var translation = gettextCatalog.getString('Motion'); return _.map(motions, function (motion) { return { - motion_translation: translation, identifier: motion.identifier, title: motion.getTitle(), }; @@ -67,20 +74,21 @@ angular.module('OpenSlidesApp.motions.docx', []) var getMotionFullData = function (motions) { var translation = gettextCatalog.getString('Motion'), + sequential_translation = gettextCatalog.getString('Sequential number'), submitters_translation = gettextCatalog.getString('Submitters'), - signature_translation = gettextCatalog.getString('Signature'), status_translation = gettextCatalog.getString('Status'), reason_translation = gettextCatalog.getString('Reason'), data = _.map(motions, function (motion) { return { motion_translation: translation, + sequential_translation: sequential_translation, + id: motion.id, identifier: motion.identifier, title: motion.getTitle(), submitters_translation: submitters_translation, submitters: _.map(motion.submitters, function (submitter) { return submitter.get_full_name(); }).join(', '), - signature_translation: signature_translation, status_translation: status_translation, status: motion.getStateName(), preamble: gettextCatalog.getString(Config.get('motions_preamble').value), diff --git a/openslides/motions/static/templates/docx/motions.docx b/openslides/motions/static/templates/docx/motions.docx index 6d5ca993601f63b48f3a21e3c0236a1273960f4e..8367feae7672cf7b4860963f9444d089b9f6500f 100644 GIT binary patch literal 7506 zcmai31z1#Fw+4~!?nXemq`SL&lpY#}?(QBMNrzNQ8l*(&kU?7DBLpcW1qLK9_p)ob#SN`(1nQRhlXY4+-E;)i+C0Xl&B4;P7#B{F9>5xNt6l z$kV_$ms88e{7mhHMGVB2@W2p0li*j3w5_}eAPM+LW9Es-5%*xIHxZNA%?ag&+$NwH zkwFUsqlpJt=>R{w`rS3cy;-TNE{#AvVA6Q38w`6uM(4l!MNa!=VL_! zch>1=GlMOz0V~dX@N;QQBP#G5ocLyaW`~p@9lh#q&f*}yspALl#V{$)SD2qAGMG(i z9l&3cbv?shhOmu`9Tcl)p0z*uk-^Qk3HD35Y2`50p#@Pw=~atMaW3>kLSzd^j)+v# z9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