From 951a121dfa29d44d64d0e4c276f4bebcd2a0f09d Mon Sep 17 00:00:00 2001 From: L_DA Date: Sun, 13 Sep 2020 19:35:33 +0000 Subject: [PATCH] Sunday is new week too. wraping timetables. Heading. --- externallib.php | 2 +- styles.css | 7 ++++++- templates/searchform.mustache | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/externallib.php b/externallib.php index a80dc9f..35782fb 100644 --- a/externallib.php +++ b/externallib.php @@ -172,7 +172,7 @@ class mod_timetable_external extends external_api { $today = new \DateTime(); $params['week'] = $today->format("W"); $dayofweek = $today->format('w'); - if ($dayofweek > 5 + get_config('timetable', 'saturday')) { + if (($dayofweek > 5 + get_config('timetable', 'saturday')) || ($dayofweek == 0)) { $params['week']++; } } diff --git a/styles.css b/styles.css index bd1c863..fe2c476 100644 --- a/styles.css +++ b/styles.css @@ -14,6 +14,11 @@ width:100%; } +div.timetables { + display: flex; + flex-wrap: wrap; +} + div.timetable { border:2px solid black; } @@ -57,4 +62,4 @@ div.timetable { text-align: center; width: 5rem; } - \ No newline at end of file + diff --git a/templates/searchform.mustache b/templates/searchform.mustache index 73d1523..7ebf23d 100644 --- a/templates/searchform.mustache +++ b/templates/searchform.mustache @@ -1,3 +1,4 @@ +

Stundenplansuche