diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2026-01-30 09:27:50 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2026-01-30 09:27:50 +0000 |
| commit | 8eff2fe1f2943e2e52aae6d209cddaaf68d2307e (patch) | |
| tree | e1c9a91ca1a26b0b9d61ff32551d4317e7da1803 | |
| parent | dc9bcf3d53a46c50db42b3afb9c99bc2d508ad61 (diff) | |
Schedule: always make the buttons for switching between week and day view visible, fixes #6209
Closes #6209
Merge request studip/studip!4701
| -rw-r--r-- | lib/classes/calendar/Helper.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/classes/calendar/Helper.php b/lib/classes/calendar/Helper.php index afcfbfd..5e3c181 100644 --- a/lib/classes/calendar/Helper.php +++ b/lib/classes/calendar/Helper.php @@ -162,15 +162,17 @@ class Helper \Studip\Fullcalendar::VIEW_WEEK => [ 'dayHeaderFormat' => ['weekday' => 'short'], 'slotDuration' => $slot_duration - ] - ]; - if (!in_array(date('N'), $hidden_days)) { - //The current day is visible: Allow a day view: - $available_views[\Studip\Fullcalendar::VIEW_DAY] = [ + ], + //The day view can be made visible regardless whether the current day + //is in the list of hidden days or not. In case, the current day is hidden, + //Fullcalendar automatically picks the next visible day in the list + //of visible days. If the last visible day lays behind the current day, + //the first visible day is picked. + \Studip\Fullcalendar::VIEW_DAY => [ 'dayHeaderFormat' => ['weekday' => 'short'], 'slotDuration' => $slot_duration - ]; - } + ] + ]; return new \Studip\Fullcalendar( _('Stundenplan'), |
