From fa5b81dad8fb931c96c766747323373f236af48c Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Wed, 11 Apr 2018 12:35:42 +0200 Subject: [PATCH] Protect numbering of the agenda --- CHANGELOG | 1 + openslides/agenda/config_variables.py | 9 +++++++++ openslides/agenda/static/js/agenda/site.js | 1 + .../agenda/static/templates/agenda/item-list.html | 13 ++++++++----- openslides/agenda/views.py | 3 +++ .../core/static/templates/config-form-field.html | 2 +- tests/integration/agenda/test_viewset.py | 6 ++++++ 7 files changed, 29 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a8e1e833c..afe106ceb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,7 @@ Agenda: - Autoupdates for all children if the item type has changed [#3659]. - Added config variable to hide internal items when projecting subitems [#3701]. +- Added config value to enable numbering of items [#3697]. Motions: - New export dialog [#3185]. diff --git a/openslides/agenda/config_variables.py b/openslides/agenda/config_variables.py index 413b17cf8..5483242c4 100644 --- a/openslides/agenda/config_variables.py +++ b/openslides/agenda/config_variables.py @@ -9,6 +9,15 @@ def get_config_variables(): It has to be evaluated during app loading (see apps.py). """ + yield ConfigVariable( + name='agenda_enable_numbering', + label='Enable numbering for agenda items', + input_type='boolean', + default_value=True, + weight=200, + group='Agenda', + subgroup='General') + yield ConfigVariable( name='agenda_number_prefix', default_value='', diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 1acdd2315..da0e0ebfe 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -769,6 +769,7 @@ angular.module('OpenSlidesApp.agenda.site', [ .config([ 'gettext', function (gettext) { + gettext('Enable numbering for agenda items'); gettext('Numbering prefix for agenda items'); gettext('This prefix will be set if you run the automatic agenda numbering.'); gettext('Agenda'); diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index 3b1834814..f965f4209 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -78,11 +78,14 @@ Sort ... - + + +