OpenSlides/openslides/agenda/config_variables.py

129 lines
3.8 KiB
Python
Raw Normal View History

from django.core.validators import MaxLengthValidator, MinValueValidator
from openslides.core.config import ConfigVariable
def get_config_variables():
"""
Generator which yields all config variables of this app.
It has to be evaluated during app loading (see apps.py).
"""
2018-04-11 12:35:42 +02:00
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_enable_numbering",
label="Enable numbering for agenda items",
input_type="boolean",
2018-04-11 12:35:42 +02:00
default_value=True,
weight=200,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="General",
)
2018-04-11 12:35:42 +02:00
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_number_prefix",
default_value="",
label="Numbering prefix for agenda items",
help_text="This prefix will be set if you run the automatic agenda numbering.",
weight=210,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="General",
validators=(MaxLengthValidator(20),),
)
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_numeral_system",
default_value="arabic",
input_type="choice",
label="Numeral system for agenda items",
choices=(
2019-01-06 16:22:33 +01:00
{"value": "arabic", "display_name": "Arabic"},
{"value": "roman", "display_name": "Roman"},
),
weight=215,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="General",
)
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_start_event_date_time",
default_value=None,
2019-01-06 16:22:33 +01:00
input_type="datetimepicker",
label="Begin of event",
help_text="Input format: DD.MM.YYYY HH:MM",
weight=220,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="General",
)
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_hide_internal_items_on_projector",
default_value=True,
2019-01-06 16:22:33 +01:00
input_type="boolean",
label="Hide internal items when projecting subitems",
weight=225,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="General",
)
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_new_items_default_visibility",
default_value="2",
input_type="choice",
choices=(
2019-01-06 16:22:33 +01:00
{"value": "1", "display_name": "Public item"},
{"value": "2", "display_name": "Internal item"},
{"value": "3", "display_name": "Hidden item"},
),
label="Default visibility for new agenda items (except topics)",
weight=227,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="General",
)
# List of speakers
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_show_last_speakers",
default_value=1,
2019-01-06 16:22:33 +01:00
input_type="integer",
label="Number of last speakers to be shown on the projector",
weight=230,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="List of speakers",
validators=(MinValueValidator(0),),
)
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_countdown_warning_time",
default_value=0,
2019-01-06 16:22:33 +01:00
input_type="integer",
label="Show orange countdown in the last x seconds of speaking time",
help_text="Enter duration in seconds. Choose 0 to disable warning color.",
weight=235,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="List of speakers",
validators=(MinValueValidator(0),),
)
yield ConfigVariable(
2019-01-06 16:22:33 +01:00
name="agenda_couple_countdown_and_speakers",
default_value=False,
2019-01-06 16:22:33 +01:00
input_type="boolean",
label="Couple countdown with the list of speakers",
help_text="[Begin speech] starts the countdown, [End speech] stops the countdown.",
weight=240,
2019-01-06 16:22:33 +01:00
group="Agenda",
subgroup="List of speakers",
)
yield ConfigVariable(
name="agenda_present_speakers_only",
default_value=False,
input_type="boolean",
label="Only present users can be on the list of speakers",
help_text="Users without the status 'present' will not be available for any list of speakers.",
weight=250,
group="Agenda",
subgroup="List of speakers",
)