diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c8910764e..ec57c0864 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,6 +20,7 @@ Motions: - New table of contents with page numbers and categories in PDF [#3766]. - New teporal field "modified final version" where the final version can be edited [#3781]. + - New config to show amendments also in motions table [#3792] Core: - Python 3.4 is not supported anymore [#3777]. diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index 1955ce284..94d352e42 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -372,7 +372,7 @@ angular.module('OpenSlidesApp.core.pdf', []) }, tocCategoryTitle: { fontSize: 12, - margin: [0,0,0,0], + margin: [0,0,0,4], bold: true, }, tocCategorySection: { @@ -960,6 +960,9 @@ angular.module('OpenSlidesApp.core.pdf', []) // not be empty otherwise it will be removed and the empty line is not displayed if (element.nextSibling && element.nextSibling.nodeName === 'BR') { currentParagraph.text.push(create('text', ' ')); + } else if (isInsideAList(element) && lineNumberMode === 'none') { + // Put a spacer there, if there is one BR in a list + alreadyConverted.push(create('text', ' ')); } currentParagraph.lineHeight = 1.25; alreadyConverted.push(currentParagraph); diff --git a/openslides/motions/config_variables.py b/openslides/motions/config_variables.py index 63f6e4ebd..3428ebae5 100644 --- a/openslides/motions/config_variables.py +++ b/openslides/motions/config_variables.py @@ -157,6 +157,15 @@ def get_config_variables(): group='Motions', subgroup='Amendments') + yield ConfigVariable( + name='motions_amendments_main_table', + default_value=False, + input_type='boolean', + label='Show amendments together with motions', + weight=337, + group='Motions', + subgroup='Amendments') + yield ConfigVariable( name='motions_amendments_prefix', default_value='-', diff --git a/openslides/motions/static/css/motions/_site.scss b/openslides/motions/static/css/motions/_site.scss index 6325e76fd..da149a8b7 100644 --- a/openslides/motions/static/css/motions/_site.scss +++ b/openslides/motions/static/css/motions/_site.scss @@ -111,6 +111,17 @@ left: 20px; } +.motion-text.line-numbers-none li > br { + margin-top: 8px; + content: " "; + display: block; + &.os-line-break { + margin-top: 0; + content: ""; + display: inline; + } +} + @mixin addChangeRecommendationBtn { cursor: pointer; content: "\f067"; diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index abd3f46ec..00efc70fc 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -468,6 +468,10 @@ angular.module('OpenSlidesApp.motions.site', [ }, // angular-formly fields for motion form getFormFields: function (isCreateForm, isParagraphBasedAmendment) { + if (!isParagraphBasedAmendment) { // catch null and undefined. Angular formy doesn't like this. + isParagraphBasedAmendment = false; + } + var workflows = Workflow.getAll(); var images = Mediafile.getAllImages(); var formFields = []; @@ -1208,7 +1212,14 @@ angular.module('OpenSlidesApp.motions.site', [ return Motion.lastModified(); }, function () { // get all main motions and order by identifier (after custom ordering) - $scope.motions = _.orderBy(Motion.filter({parent_id: undefined}), ['identifier']); + var motions; + if (Config.get('motions_amendments_main_table').value) { + motions = Motion.getAll(); + } else { + motions = Motion.filter({parent_id: undefined}); + } + + $scope.motions = _.orderBy(motions, ['identifier']); _.forEach($scope.motions, function (motion) { MotionComment.populateFields(motion); motion.personalNote = PersonalNoteManager.getNote(motion); @@ -3229,6 +3240,7 @@ angular.module('OpenSlidesApp.motions.site', [ // subgroup Amendments gettext('Amendments'); gettext('Activate amendments'); + gettext('Show amendments together with motions'); gettext('Prefix for the identifier for amendments'); gettext('Apply text for new amendments'); gettext('The title of the motion is always applied.'); diff --git a/openslides/motions/static/templates/motions/motion-amendment-list.html b/openslides/motions/static/templates/motions/motion-amendment-list.html index 25232beba..3de76eb7a 100644 --- a/openslides/motions/static/templates/motions/motion-amendment-list.html +++ b/openslides/motions/static/templates/motions/motion-amendment-list.html @@ -31,6 +31,12 @@ @@ -357,10 +357,11 @@ {{ getTextPreview(amendment.getText(), 400) }} +