Merge pull request #1795 from normanjaeckel/StaticImpressumPage

Added config field for legal notes.
This commit is contained in:
Oskar Hahn 2016-01-09 13:22:54 +01:00
commit 622dadd4ef
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.
- Removed most of the Django views and templates.
- Removed Django error pages.
- Added page for legal notes.
- Refactored projector API using metaclasses now.
- Renamed SignalConnectMetaClass classmethod get_all_objects to get_all
(private API).

View File

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

View File

@ -55,7 +55,6 @@ def setup_general_config(sender, **kwargs):
group=ugettext_lazy('General'),
subgroup=ugettext_lazy('Event'))
# TODO: Check whether this variable is ever used.
yield ConfigVariable(
name='general_event_organizer',
default_value='',
@ -64,6 +63,15 @@ def setup_general_config(sender, **kwargs):
group=ugettext_lazy('General'),
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
yield ConfigVariable(

View File

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

View File

@ -2,8 +2,10 @@
<label>{{ label }}</label>
<div class="input-group">
<input ng-if="type != 'choice'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}" type="{{ type }}"
class="form-control">
<input ng-if="type != 'choice' && type != 'textarea'" ng-model="value" ng-change="save(configOption.key, value)" id="{{ key }}"
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 }}"
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="title">
<h1 translate>Version</h1>
<h1 translate>Legal Notes and Version</h1>
</div>
</div>
<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">
<p translate>Installed plugins:</p>
<ol>