From 8eff2fe1f2943e2e52aae6d209cddaaf68d2307e Mon Sep 17 00:00:00 2001 From: Moritz Strohm Date: Fri, 30 Jan 2026 09:27:50 +0000 Subject: Schedule: always make the buttons for switching between week and day view visible, fixes #6209 Closes #6209 Merge request studip/studip!4701 --- lib/classes/calendar/Helper.php | 16 +++++++++------- 1 file 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'), -- cgit v1.0