Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Chronos
Commits
35181bae
Commit
35181bae
authored
4 months ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Make weekdays selectable in backend
parent
7e337c81
Branches
130-show-print-timetable-button-on-mobile-devices
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!385
Resolve "Hide days"
Pipeline
#193605
failed
4 months ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/preferences.py
+22
-0
22 additions, 0 deletions
aleksis/apps/chronos/preferences.py
with
22 additions
and
0 deletions
aleksis/apps/chronos/preferences.py
+
22
−
0
View file @
35181bae
...
...
@@ -122,3 +122,25 @@ class SupervisionEventFeedColor(StringPreference):
verbose_name
=
_
(
"
Supervision calendar feed color
"
)
widget
=
ColorWidget
required
=
True
@site_preferences_registry.register
class
DaysInCalendar
(
MultipleChoicePreference
):
section
=
chronos
name
=
"
days_in_calendar
"
default
=
[
"
1
"
,
"
2
"
,
"
3
"
,
"
4
"
,
"
5
"
]
verbose_name
=
_
(
"
Days of the week that appear in the timetable
"
)
choices
=
[
(
"
1
"
,
_
(
"
Monday
"
)),
(
"
2
"
,
_
(
"
Tuesday
"
)),
(
"
3
"
,
_
(
"
Wednesday
"
)),
(
"
4
"
,
_
(
"
Thursday
"
)),
(
"
5
"
,
_
(
"
Friday
"
)),
(
"
6
"
,
_
(
"
Saturday
"
)),
(
"
0
"
,
_
(
"
Sunday
"
)),
]
required
=
True
def
validate
(
self
,
value
):
for
v
in
value
:
if
int
(
v
)
not
in
self
.
get_choice_values
():
raise
ValidationError
(
f
"
{
v
}
is not a valid choice
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment