2016-06-02 12:47:01 +02:00
|
|
|
from django.core.validators import MaxLengthValidator
|
2016-09-17 22:26:23 +02:00
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
from openslides.core.config import ConfigVariable
|
|
|
|
|
|
|
|
|
|
|
|
def get_config_variables():
|
|
|
|
"""
|
|
|
|
Generator which yields all config variables of this app.
|
|
|
|
|
|
|
|
There are two main groups: 'General' and 'Projector'. The group 'General'
|
|
|
|
has subgroups. The generator has to be evaluated during app loading
|
|
|
|
(see apps.py).
|
|
|
|
"""
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_name',
|
|
|
|
default_value='OpenSlides',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event name',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=110,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-09-01 15:32:59 +02:00
|
|
|
validators=(MaxLengthValidator(100),))
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_description',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='Presentation and assembly system',
|
|
|
|
label='Short description of event',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=115,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
validators=(MaxLengthValidator(100),),
|
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_date',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event date',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=120,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_location',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event location',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=125,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_organizer',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Event organizer',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=130,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_legal_notice',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='<a href="http://www.openslides.org">OpenSlides</a> is a '
|
|
|
|
'free web based presentation and assembly system for '
|
|
|
|
'visualizing and controlling agenda, motions and '
|
|
|
|
'elections of an assembly.',
|
2017-01-06 10:00:31 +01:00
|
|
|
input_type='markupText',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Legal notice',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=132,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_welcome_title',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='Welcome to OpenSlides',
|
|
|
|
label='Front page title',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=134,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_event_welcome_text',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='[Space for your welcome text.]',
|
2017-01-06 10:00:31 +01:00
|
|
|
input_type='markupText',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Front page text',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=136,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Event',
|
2016-06-02 12:47:01 +02:00
|
|
|
translatable=True)
|
|
|
|
|
|
|
|
# General System
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_system_enable_anonymous',
|
|
|
|
default_value=False,
|
|
|
|
input_type='boolean',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Allow access for anonymous guest users',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=138,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='System')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_login_info_text',
|
|
|
|
default_value='',
|
2017-02-17 23:10:50 +01:00
|
|
|
label='Show this text on the login page',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=140,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='System')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
2017-07-27 15:17:40 +02:00
|
|
|
# General export settings
|
2017-02-07 12:44:51 +01:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_csv_separator',
|
|
|
|
default_value=',',
|
2017-02-17 23:10:50 +01:00
|
|
|
label='Separator used for all csv exports and examples',
|
2017-07-28 14:31:59 +02:00
|
|
|
weight=142,
|
2017-02-07 12:44:51 +01:00
|
|
|
group='General',
|
2017-07-27 15:17:40 +02:00
|
|
|
subgroup='Export')
|
2017-07-26 15:34:05 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_export_pdf_pagenumber_alignment',
|
|
|
|
default_value='center',
|
|
|
|
input_type='choice',
|
2017-07-27 14:20:57 +02:00
|
|
|
label='Page number alignment in PDF',
|
2017-07-26 15:34:05 +02:00
|
|
|
choices=(
|
|
|
|
{'value': 'left', 'display_name': 'Left'},
|
|
|
|
{'value': 'center', 'display_name': 'Center'},
|
|
|
|
{'value': 'right', 'display_name': 'Right'}),
|
2017-07-28 14:31:59 +02:00
|
|
|
weight=144,
|
2017-07-26 15:34:05 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Export')
|
|
|
|
|
2017-07-27 14:20:57 +02:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='general_export_pdf_fontsize',
|
|
|
|
default_value='10',
|
|
|
|
input_type='choice',
|
|
|
|
label='Standard font size in PDF',
|
|
|
|
choices=(
|
|
|
|
{'value': '10', 'display_name': '10'},
|
|
|
|
{'value': '11', 'display_name': '11'},
|
|
|
|
{'value': '12', 'display_name': '12'}),
|
2017-07-27 15:17:40 +02:00
|
|
|
weight=146,
|
2017-07-27 14:20:57 +02:00
|
|
|
group='General',
|
|
|
|
subgroup='Export')
|
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
# Projector
|
|
|
|
|
2016-12-19 13:26:07 +01:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_language',
|
|
|
|
default_value='browser',
|
|
|
|
input_type='choice',
|
|
|
|
label='Projector language',
|
|
|
|
choices=(
|
|
|
|
{'value': 'browser', 'display_name': 'Current browser language'},
|
|
|
|
{'value': 'en', 'display_name': 'English'},
|
|
|
|
{'value': 'de', 'display_name': 'Deutsch'},
|
|
|
|
{'value': 'fr', 'display_name': 'Français'},
|
|
|
|
{'value': 'es', 'display_name': 'Español'},
|
|
|
|
{'value': 'pt', 'display_name': 'Português'},
|
2017-03-05 22:22:23 +01:00
|
|
|
{'value': 'cs', 'display_name': 'Čeština'},
|
|
|
|
{'value': 'ru', 'display_name': 'русский'}),
|
2017-07-28 14:31:59 +02:00
|
|
|
weight=150,
|
2016-12-19 13:26:07 +01:00
|
|
|
group='Projector')
|
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_enable_logo',
|
|
|
|
default_value=True,
|
|
|
|
input_type='boolean',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Show logo on projector',
|
2017-04-13 10:23:52 +02:00
|
|
|
help_text='You can replace the logo by uploading an image and set it as '
|
2017-04-24 10:28:14 +02:00
|
|
|
'the "Projector logo" in "files".',
|
2017-07-28 14:31:59 +02:00
|
|
|
weight=152,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_enable_title',
|
|
|
|
default_value=True,
|
|
|
|
input_type='boolean',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Show title and description of event on projector',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=155,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
2017-04-13 10:23:52 +02:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_enable_clock',
|
|
|
|
default_value=True,
|
|
|
|
input_type='boolean',
|
|
|
|
label='Show the clock on projector',
|
2017-07-28 14:31:59 +02:00
|
|
|
weight=154,
|
2017-04-13 10:23:52 +02:00
|
|
|
group='Projector')
|
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_header_backgroundcolor',
|
|
|
|
default_value='#317796',
|
|
|
|
input_type='colorpicker',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Background color of projector header and footer',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=160,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_header_fontcolor',
|
|
|
|
default_value='#F5F5F5',
|
|
|
|
input_type='colorpicker',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Font color of projector header and footer',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=165,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_h1_fontcolor',
|
|
|
|
default_value='#317796',
|
|
|
|
input_type='colorpicker',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Font color of projector headline',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=170,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_default_countdown',
|
|
|
|
default_value=60,
|
2016-08-03 21:03:40 +02:00
|
|
|
input_type='integer',
|
2016-09-30 17:19:27 +02:00
|
|
|
label='Predefined seconds of new countdowns',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=185,
|
2016-06-09 16:12:13 +02:00
|
|
|
group='Projector')
|
2016-08-25 16:40:34 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
2016-09-12 11:05:34 +02:00
|
|
|
name='projector_blank_color',
|
|
|
|
default_value='#FFFFFF',
|
|
|
|
input_type='colorpicker',
|
|
|
|
label='Color for blanked projector',
|
|
|
|
weight=190,
|
2016-08-25 16:40:34 +02:00
|
|
|
group='Projector')
|
2016-09-12 11:05:34 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_broadcast',
|
|
|
|
default_value=0,
|
|
|
|
input_type='integer',
|
|
|
|
label='Projector which is broadcasted',
|
|
|
|
weight=200,
|
|
|
|
group='Projector',
|
|
|
|
hidden=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='projector_currentListOfSpeakers_reference',
|
|
|
|
default_value=1,
|
|
|
|
input_type='integer',
|
|
|
|
label='Projector reference for list of speakers',
|
|
|
|
weight=201,
|
|
|
|
group='Projector',
|
|
|
|
hidden=True)
|
2017-03-31 13:48:41 +02:00
|
|
|
|
|
|
|
# Logos.
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='logos_available',
|
2017-04-13 10:23:52 +02:00
|
|
|
default_value=[
|
|
|
|
'logo_projector_main',
|
2017-04-19 14:56:15 +02:00
|
|
|
'logo_projector_header',
|
2017-06-22 08:44:59 +02:00
|
|
|
'logo_web_header',
|
2017-04-19 14:56:15 +02:00
|
|
|
'logo_pdf_header',
|
2017-06-21 19:32:02 +02:00
|
|
|
'logo_pdf_footer',
|
2017-06-22 08:44:59 +02:00
|
|
|
'logo_pdf_assignment_ballot_paper',
|
|
|
|
'logo_pdf_motion_poll'],
|
2017-03-31 13:48:41 +02:00
|
|
|
weight=300,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='logo_projector_main',
|
|
|
|
default_value={
|
2017-04-24 10:28:14 +02:00
|
|
|
'display_name': 'Projector logo',
|
2017-03-31 13:48:41 +02:00
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
|
|
|
weight=301,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
2017-04-13 10:23:52 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='logo_projector_header',
|
|
|
|
default_value={
|
|
|
|
'display_name': 'Projector header image',
|
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
|
|
|
weight=302,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
2017-04-19 14:56:15 +02:00
|
|
|
|
2017-06-22 08:44:59 +02:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='logo_web_header',
|
|
|
|
default_value={
|
|
|
|
'display_name': 'Web interface header logo',
|
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
|
|
|
weight=303,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
|
|
|
|
2017-04-26 16:09:27 +02:00
|
|
|
# PDF logos
|
2017-04-19 14:56:15 +02:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='logo_pdf_header',
|
|
|
|
default_value={
|
2017-04-27 12:47:04 +02:00
|
|
|
'display_name': 'PDF header logo',
|
2017-04-19 14:56:15 +02:00
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
|
|
|
weight=310,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='logo_pdf_footer',
|
|
|
|
default_value={
|
2017-04-27 12:47:04 +02:00
|
|
|
'display_name': 'PDF footer logo',
|
2017-04-19 14:56:15 +02:00
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
|
|
|
weight=311,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
2017-06-21 19:32:02 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
2017-06-22 08:44:59 +02:00
|
|
|
name='logo_pdf_assignment_ballot_paper',
|
2017-06-21 19:32:02 +02:00
|
|
|
default_value={
|
2017-06-22 08:44:59 +02:00
|
|
|
'display_name': 'Election ballot paper',
|
2017-06-21 19:32:02 +02:00
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
2017-06-22 08:44:59 +02:00
|
|
|
weight=312,
|
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='logo_pdf_motion_poll',
|
|
|
|
default_value={
|
|
|
|
'display_name': 'Motion poll',
|
|
|
|
'path': ''},
|
|
|
|
input_type='logo',
|
|
|
|
weight=313,
|
2017-06-21 19:32:02 +02:00
|
|
|
group='Logo',
|
|
|
|
hidden=True)
|