2016-06-02 12:47:01 +02:00
|
|
|
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).
|
|
|
|
"""
|
2019-08-14 21:53:42 +02:00
|
|
|
|
|
|
|
# General
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name="agenda_start_event_date_time",
|
|
|
|
default_value=None,
|
|
|
|
input_type="datetimepicker",
|
|
|
|
label="Begin of event",
|
|
|
|
help_text="Input format: DD.MM.YYYY HH:MM",
|
|
|
|
weight=200,
|
|
|
|
group="Agenda",
|
|
|
|
subgroup="General",
|
|
|
|
)
|
|
|
|
|
|
|
|
# Numbering
|
|
|
|
|
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,
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=205,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
2019-08-14 21:53:42 +02:00
|
|
|
subgroup="Numbering",
|
2019-01-06 16:22:33 +01:00
|
|
|
)
|
2018-04-11 12:35:42 +02:00
|
|
|
|
2016-06-02 12:47:01 +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.",
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=206,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
2019-08-14 21:53:42 +02:00
|
|
|
subgroup="Numbering",
|
2019-01-06 16:22:33 +01:00
|
|
|
validators=(MaxLengthValidator(20),),
|
|
|
|
)
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
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",
|
2016-06-02 12:47:01 +02:00
|
|
|
choices=(
|
2019-01-06 16:22:33 +01:00
|
|
|
{"value": "arabic", "display_name": "Arabic"},
|
|
|
|
{"value": "roman", "display_name": "Roman"},
|
|
|
|
),
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=207,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
2019-08-14 21:53:42 +02:00
|
|
|
subgroup="Numbering",
|
2019-01-06 16:22:33 +01:00
|
|
|
)
|
2016-06-02 12:47:01 +02:00
|
|
|
|
2019-08-14 21:53:42 +02:00
|
|
|
# Visibility
|
2016-06-02 12:47:01 +02:00
|
|
|
|
2018-04-11 13:46:40 +02:00
|
|
|
yield ConfigVariable(
|
2019-08-14 21:53:42 +02:00
|
|
|
name="agenda_item_creation",
|
|
|
|
label="Add to agenda",
|
|
|
|
default_value="default_yes",
|
|
|
|
input_type="choice",
|
|
|
|
choices=(
|
|
|
|
{"value": "always", "display_name": "Always"},
|
|
|
|
{"value": "never", "display_name": "Never"},
|
|
|
|
{"value": "default_yes", "display_name": "Ask, default yes"},
|
|
|
|
{"value": "default_no", "display_name": "Ask, default no"},
|
|
|
|
),
|
|
|
|
weight=210,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
2019-08-14 21:53:42 +02:00
|
|
|
subgroup="Visibility",
|
2019-01-06 16:22:33 +01:00
|
|
|
)
|
2018-04-11 13:46:40 +02:00
|
|
|
|
2018-08-15 11:15:54 +02:00
|
|
|
yield ConfigVariable(
|
2019-01-06 16:22:33 +01:00
|
|
|
name="agenda_new_items_default_visibility",
|
|
|
|
default_value="2",
|
|
|
|
input_type="choice",
|
2018-08-15 11:15:54 +02:00
|
|
|
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)",
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=211,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
2019-08-14 21:53:42 +02:00
|
|
|
subgroup="Visibility",
|
|
|
|
)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name="agenda_hide_internal_items_on_projector",
|
|
|
|
default_value=True,
|
|
|
|
input_type="boolean",
|
|
|
|
label="Hide internal items when projecting subitems",
|
|
|
|
weight=212,
|
|
|
|
group="Agenda",
|
|
|
|
subgroup="Visibility",
|
2019-01-06 16:22:33 +01:00
|
|
|
)
|
2018-08-15 11:15:54 +02:00
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
# List of speakers
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
2019-01-06 16:22:33 +01:00
|
|
|
name="agenda_show_last_speakers",
|
2019-08-14 21:53:42 +02:00
|
|
|
default_value=0,
|
2019-01-06 16:22:33 +01:00
|
|
|
input_type="integer",
|
|
|
|
label="Number of last speakers to be shown on the projector",
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=220,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
|
|
|
subgroup="List of speakers",
|
|
|
|
validators=(MinValueValidator(0),),
|
|
|
|
)
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
2019-01-06 16:22:33 +01:00
|
|
|
name="agenda_countdown_warning_time",
|
2016-06-02 12:47:01 +02:00
|
|
|
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.",
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=221,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
|
|
|
subgroup="List of speakers",
|
|
|
|
validators=(MinValueValidator(0),),
|
|
|
|
)
|
2016-06-02 12:47:01 +02:00
|
|
|
|
2019-07-05 16:35:32 +02:00
|
|
|
yield ConfigVariable(
|
2019-08-14 21:53:42 +02:00
|
|
|
name="projector_default_countdown",
|
|
|
|
default_value=60,
|
|
|
|
input_type="integer",
|
|
|
|
label="Predefined seconds of new countdowns",
|
|
|
|
weight=222,
|
2019-07-05 16:35:32 +02:00
|
|
|
group="Agenda",
|
|
|
|
subgroup="List of speakers",
|
|
|
|
)
|
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
yield ConfigVariable(
|
2019-01-06 16:22:33 +01:00
|
|
|
name="agenda_couple_countdown_and_speakers",
|
2019-08-14 21:53:42 +02:00
|
|
|
default_value=True,
|
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.",
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=223,
|
|
|
|
group="Agenda",
|
|
|
|
subgroup="List of speakers",
|
|
|
|
)
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name="agenda_hide_amount_of_speakers",
|
|
|
|
default_value=False,
|
|
|
|
input_type="boolean",
|
|
|
|
label="Hide the amount of speakers in subtitle of list of speakers slide",
|
|
|
|
weight=224,
|
2019-01-06 16:22:33 +01:00
|
|
|
group="Agenda",
|
|
|
|
subgroup="List of speakers",
|
|
|
|
)
|
2019-05-06 12:28:28 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name="agenda_present_speakers_only",
|
|
|
|
default_value=False,
|
|
|
|
input_type="boolean",
|
2019-05-29 09:42:34 +02:00
|
|
|
label="Only present participants can be added to the list of speakers",
|
2019-08-14 21:53:42 +02:00
|
|
|
weight=225,
|
2019-05-06 12:28:28 +02:00
|
|
|
group="Agenda",
|
|
|
|
subgroup="List of speakers",
|
|
|
|
)
|