Added config field for legal notes.

This commit is contained in:
Norman Jäckel 2016-01-09 12:51:26 +01:00
parent 96328f033b
commit d7e39be708
6 changed files with 22 additions and 5 deletions

View File

@ -38,6 +38,7 @@ Other:
for generic Django REST Framework views in OpenSlides apps. for generic Django REST Framework views in OpenSlides apps.
- Removed most of the Django views and templates. - Removed most of the Django views and templates.
- Removed Django error pages. - Removed Django error pages.
- Added page for legal notes.
- Refactored projector API using metaclasses now. - Refactored projector API using metaclasses now.
- Renamed SignalConnectMetaClass classmethod get_all_objects to get_all - Renamed SignalConnectMetaClass classmethod get_all_objects to get_all
(private API). (private API).

View File

@ -6,6 +6,7 @@ from .models import ConfigStore
INPUT_TYPE_MAPPING = { INPUT_TYPE_MAPPING = {
'string': str, 'string': str,
'text': str,
'integer': int, 'integer': int,
'boolean': bool, 'boolean': bool,
'choice': str} 'choice': str}

View File

@ -55,7 +55,6 @@ def setup_general_config(sender, **kwargs):
group=ugettext_lazy('General'), group=ugettext_lazy('General'),
subgroup=ugettext_lazy('Event')) subgroup=ugettext_lazy('Event'))
# TODO: Check whether this variable is ever used.
yield ConfigVariable( yield ConfigVariable(
name='general_event_organizer', name='general_event_organizer',
default_value='', default_value='',
@ -64,6 +63,15 @@ def setup_general_config(sender, **kwargs):
group=ugettext_lazy('General'), group=ugettext_lazy('General'),
subgroup=ugettext_lazy('Event')) subgroup=ugettext_lazy('Event'))
yield ConfigVariable(
name='general_event_legal_notes',
default_value='',
input_type='text',
label=ugettext_lazy('Legal notes'),
weight=132,
group=ugettext_lazy('General'),
subgroup=ugettext_lazy('Event'))
# General System # General System
yield ConfigVariable( yield ConfigVariable(

View File

@ -321,6 +321,7 @@ angular.module('OpenSlidesApp.core.site', [
function getHtmlType(type) { function getHtmlType(type) {
return { return {
string: 'text', string: 'text',
text: 'textarea',
integer: 'number', integer: 'number',
boolean: 'checkbox', boolean: 'checkbox',
choice: 'choice', choice: 'choice',

View File

@ -2,8 +2,10 @@
<label>{{ label }}</label> <label>{{ label }}</label>
<div class="input-group"> <div class="input-group">
<input ng-if="type != 'choice'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}" type="{{ type }}" <input ng-if="type != 'choice' && type != 'textarea'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}"
class="form-control"> type="{{ type }}" class="form-control">
<textarea ng-if="type == 'textarea'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}" class="form-control">
<select ng-if="type == 'choice'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}" <select ng-if="type == 'choice'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}"
class="form-control" ng-options="option.value as option.display_name for option in choices"> class="form-control" ng-options="option.value as option.display_name for option in choices">

View File

@ -1,12 +1,16 @@
<div class="header"> <div class="header">
<div class="title"> <div class="title">
<h1 translate>Version</h1> <h1 translate>Legal Notes and Version</h1>
</div> </div>
</div> </div>
<div class="details"> <div class="details">
<p class="lead">OpenSlides {{ core_version }} <p class="lead" translate>Legal Notes</p>
{{ config('general_event_legal_notes') }}
</div>
<div class="details">
<p class="lead">OpenSlides {{ core_version }}
<div ng-show="plugins.length"> <div ng-show="plugins.length">
<p translate>Installed plugins:</p> <p translate>Installed plugins:</p>
<ol> <ol>