diff --git a/CHANGELOG b/CHANGELOG
index 925a060b2..9898678af 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -37,6 +37,7 @@ Motions:
- Added blocks for motions which can set as agenda item.
Set states for multiple motions of a motion block by following
the recommendations of each motion.
+- Used global config variable for preamble.
Users:
- Added field is_committee and new default group Committees.
diff --git a/openslides/motions/static/js/motions/docx.js b/openslides/motions/static/js/motions/docx.js
index a02d5bb9d..1720903ac 100644
--- a/openslides/motions/static/js/motions/docx.js
+++ b/openslides/motions/static/js/motions/docx.js
@@ -11,7 +11,7 @@ angular.module('OpenSlidesApp.motions.docx', [])
'gettextCatalog',
'FileSaver',
function ($http, $q, Config, gettextCatalog, FileSaver) {
-
+
var PAGEBREAK = '';
var TAGS_NO_PARAM = ['b', 'strong', 'em', 'i'];
@@ -30,8 +30,8 @@ angular.module('OpenSlidesApp.motions.docx', [])
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; }
+ if (d<10) { d='0'+d; }
+ if (m<10) { m='0'+m; }
return d+'.'+m+'.'+y;
}();
data.pagebreak_main = motions.length === 0 ? '' : PAGEBREAK;
@@ -44,7 +44,7 @@ angular.module('OpenSlidesApp.motions.docx', [])
return data;
};
-
+
var getCategoriesData = function (categories) {
return _.map(categories, function (category) {
return {
@@ -83,6 +83,7 @@ angular.module('OpenSlidesApp.motions.docx', [])
signature_translation: signature_translation,
status_translation: status_translation,
status: motion.getStateName(),
+ preamble: gettextCatalog.getString(Config.get('motions_preamble').value),
text: html2docx(motion.getText()),
reason_translation: motion.getReason().length === 0 ? '' : reason_translation,
reason: html2docx(motion.getReason()),
diff --git a/openslides/motions/static/js/motions/pdf.js b/openslides/motions/static/js/motions/pdf.js
index 12bc7e41e..bd4be314d 100644
--- a/openslides/motions/static/js/motions/pdf.js
+++ b/openslides/motions/static/js/motions/pdf.js
@@ -248,6 +248,14 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
}];
};
+ // motion preamble
+ var motionPreamble = function () {
+ return {
+ text: Config.translate(Config.get('motions_preamble').value),
+ style: 'textItem',
+ };
+ };
+
// motion text (with line-numbers)
var motionText = function() {
@@ -299,6 +307,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
subtitle,
metaTable(),
motionTitle(),
+ motionPreamble(),
motionText(),
];
if (motionReason()) {
diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js
index aa0a438f1..60a08a736 100644
--- a/openslides/motions/static/js/motions/site.js
+++ b/openslides/motions/static/js/motions/site.js
@@ -1396,8 +1396,6 @@ angular.module('OpenSlidesApp.motions.site', [
var isAmendment = $scope.$parent.motion && $scope.$parent.motion.id;
// Set default values for create form
- // ... set preamble config value as text
- $scope.model.text = gettextCatalog.getString(Config.get('motions_preamble').value);
// ... for amendments add parent_id
if (isAmendment) {
if (Config.get('motions_amendments_apply_text').value) {
diff --git a/openslides/motions/static/templates/docx/motions.docx b/openslides/motions/static/templates/docx/motions.docx
index 200f37e9c..6d5ca9936 100644
Binary files a/openslides/motions/static/templates/docx/motions.docx and b/openslides/motions/static/templates/docx/motions.docx differ
diff --git a/openslides/motions/static/templates/motions/motion-detail.html b/openslides/motions/static/templates/motions/motion-detail.html
index 0e7b6bf3e..b4e9b305d 100644
--- a/openslides/motions/static/templates/motions/motion-detail.html
+++ b/openslides/motions/static/templates/motions/motion-detail.html
@@ -343,6 +343,9 @@
+
+
{{ config('motions_preamble') | translate }}
+
diff --git a/openslides/motions/static/templates/motions/slide_motion.html b/openslides/motions/static/templates/motions/slide_motion.html
index 961991b45..7fda65301 100644
--- a/openslides/motions/static/templates/motions/slide_motion.html
+++ b/openslides/motions/static/templates/motions/slide_motion.html
@@ -75,6 +75,9 @@
+
+
{{ config('motions_preamble') | translate }}
+