From f981106524918d9a388756287c1f4564db437999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Wed, 14 Aug 2019 21:53:42 +0200 Subject: [PATCH] Rework config defaults. - move motion setttings from settings.py to config that user can change it while runtime - show help text for config fields as tooltip --- .../app/core/translate/marked-translations.ts | 20 ++- .../config-field/config-field.component.html | 13 +- .../services/local-permissions.service.ts | 17 +-- openslides/agenda/config_variables.py | 129 ++++++++++-------- openslides/assignments/config_variables.py | 26 ++-- openslides/core/apps.py | 3 - openslides/core/config_variables.py | 32 ----- openslides/motions/config_variables.py | 121 ++++++++++------ openslides/motions/models.py | 33 ++--- openslides/users/config_variables.py | 14 +- openslides/utils/settings.py.tpl | 7 - tests/integration/motions/test_viewset.py | 24 ++-- tests/old/motions/test_models.py | 5 +- tests/settings.py | 5 - tests/unit/motions/test_projector.py | 12 +- 15 files changed, 227 insertions(+), 234 deletions(-) diff --git a/client/src/app/core/translate/marked-translations.ts b/client/src/app/core/translate/marked-translations.ts index b9ca6d509..e562ee269 100644 --- a/client/src/app/core/translate/marked-translations.ts +++ b/client/src/app/core/translate/marked-translations.ts @@ -100,9 +100,6 @@ _('Topics'); _('General'); _('Workflow of new motions'); _('Workflow of new statute amendments'); -_('Numbered per category'); -_('Serially numbered'); -_('Set it manually'); _('Motion preamble'); _('The assembly may decide:'); _('Default line numbering'); @@ -113,8 +110,9 @@ _('Reason required for creating new motion'); _('Hide reason on projector'); _('Hide meta information box on projector'); _('Hide recommendation on projector'); +_('Show the sequential number for a motion'); +_('In motion list, motion detail and PDF.'); _('Stop submitting new motions by non-staff users'); -_('Allow to disable versioning'); _('Name of recommender'); _( 'Will be displayed as label before selected recommendation. Use an empty value to disable the recommendation system.' @@ -122,7 +120,15 @@ _( _('Name of recommender for statute amendments'); _('Will be displayed as label before selected recommendation in statute amendments.'); _('Default text version for change recommendations'); -_('Show the sequential number for a motion'); +_('Sort motions by'); +// subgroup Numbering +_('Numbered per category'); +_('Serially numbered'); +_('Set it manually'); +_('Number of minimal digits for identifier'); +_('Uses leading zeros to sort motions correctly by identifier.'); +_('Allow blank in identifier'); +_("Blank between prefix and number, e.g. 'A 001'."); // subgroup Amendments _('Amendments'); _('Activate statute amendments'); @@ -135,6 +141,7 @@ _('How to create new amendments'); _('Empty text field'); _('Edit the whole motion text'); _('Paragraph-based, Diff-enabled'); +_('Allow amendments of amendments'); // subgroup Supporters _('Supporters'); _('Number of (minimum) required supporters for a motion'); @@ -165,7 +172,6 @@ _('Title for PDF documents of motions'); _('Preamble text for PDF documents of motions'); _('Show submitters and recommendation in table of contents'); _('Show checkbox to record decision'); -_('Sort motions by'); // misc motion strings _('Amendment'); _('Statute amendment for'); @@ -340,7 +346,7 @@ _('Sender name'); _('The sender address is defined in the OpenSlides server settings and should modified by administrator only.'); _('Reply address'); _('Email subject'); -_('Your login for {event_name}'); +_('OpenSlides access data'); _('You can use {event_name} and {username} as placeholder.'); _('Email body'); _( diff --git a/client/src/app/site/config/components/config-field/config-field.component.html b/client/src/app/site/config/components/config-field/config-field.component.html index c07e55644..caf196af8 100644 --- a/client/src/app/site/config/components/config-field/config-field.component.html +++ b/client/src/app/site/config/components/config-field/config-field.component.html @@ -14,7 +14,6 @@ {{ configItem.label | translate }} - {{ configItem.helpText | translate }} check_circle @@ -44,9 +43,6 @@
{{ configItem.label | translate }} - - {{ configItem.helpText | translate }} -
{{ error }}
@@ -60,9 +56,6 @@ placeholder="{{ configItem.label | translate }}" [value]="translatedValue" > - - {{ configItem.helpText | translate }} - check_circle @@ -79,7 +72,6 @@ /> {{ configItem.label | translate }} - {{ configItem.helpText | translate }} check_circle @@ -105,6 +97,11 @@
+
+ +