From 17959bd9c57a86c086f5ea7a38d818e7c8e78c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Wed, 11 Oct 2017 22:45:01 +0200 Subject: [PATCH] Motion template improvements (Fixed #3303) - Sort categories drop downs by config value (name or prefix) (fixed #3303). - Show comment fiels in pdf without "Comment" as prefix. - Improved heading style in web and pdf. - Added motion block to motion pdf. --- openslides/core/static/css/app.css | 13 +++++++++++++ .../motions/static/js/motions/linenumbering.js | 6 +++--- openslides/motions/static/js/motions/pdf.js | 16 ++++++++++++++-- .../static/templates/motions/motion-detail.html | 2 +- .../motions/motion-detail/comments.html | 2 +- .../motions/motion-detail/personal-note.html | 2 +- .../static/templates/motions/motion-list.html | 10 ++++++---- .../karma/motions/linenumbering.service.test.js | 12 ++++++------ 8 files changed, 45 insertions(+), 18 deletions(-) diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index 2108942ee..edaf8de63 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -46,6 +46,19 @@ h1, h2, h3, h4, h5, h6, #header .title { #content .col1 .meta .heading .drop-down-name, #content .col1 .meta h3 { font-family: 'Roboto Condensed Light'; } +.details h1 { + font-size: 20px; + color: #000; +} +.details h2 { + font-size: 18px; + color: #000; +} +.details h3 { + font-size: 16px; + color: #000; +} + /* * Template styles for OpenSlides site diff --git a/openslides/motions/static/js/motions/linenumbering.js b/openslides/motions/static/js/motions/linenumbering.js index 4ef1eb5b6..85544c705 100644 --- a/openslides/motions/static/js/motions/linenumbering.js +++ b/openslides/motions/static/js/motions/linenumbering.js @@ -324,13 +324,13 @@ angular.module('OpenSlidesApp.motions.lineNumbering', []) } break; case 'H1': - newLength *= 0.5; + newLength *= 0.66; break; case 'H2': - newLength *= 0.66; + newLength *= 0.75; break; case 'H3': - newLength *= 0.66; + newLength *= 0.85; break; } return Math.ceil(newLength); diff --git a/openslides/motions/static/js/motions/pdf.js b/openslides/motions/static/js/motions/pdf.js index 0936259e6..7f8fd39cb 100644 --- a/openslides/motions/static/js/motions/pdf.js +++ b/openslides/motions/static/js/motions/pdf.js @@ -127,6 +127,18 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf']) ]); } + // motion block + if (motion.motionBlock) { + metaTableBody.push([ + { + text: gettextCatalog.getString('Motion block') + ':', + style: ['bold', 'grey'] }, + { + text: motion.motionBlock.title, + style: 'grey' + } + ]); + } // voting result if (motion.polls.length > 0 && motion.polls[0].has_votes) { var column1 = []; @@ -313,7 +325,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf']) var comments = []; _.forEach(fields, function (field, id) { if (motion.comments[id]) { - var title = gettextCatalog.getString('Comment') + ' ' + field.name; + var title = field.name; if (!field.public) { title += ' (' + gettextCatalog.getString('internal') + ')'; } @@ -1020,7 +1032,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf']) var content = []; _.forEach(fields, function (field, id) { if (motion.comments[id]) { - var title = gettextCatalog.getString('Comment') + ' ' + field.name; + var title = field.name; if (!field.public) { title += ' (' + gettextCatalog.getString('internal') + ')'; } diff --git a/openslides/motions/static/templates/motions/motion-detail.html b/openslides/motions/static/templates/motions/motion-detail.html index a6967dfa7..515a18ba6 100644 --- a/openslides/motions/static/templates/motions/motion-detail.html +++ b/openslides/motions/static/templates/motions/motion-detail.html @@ -235,7 +235,7 @@