From 66b68226f637357b8f0283da39c5b5d047870a08 Mon Sep 17 00:00:00 2001 From: Peter Thienel <thienel@data-quest.de> Date: Wed, 22 Mar 2023 12:15:43 +0000 Subject: [PATCH] Resolve "Terminkalender Ansichten Jahr und Tag defekt", fixes #2219 Closes #2219 Merge request studip/studip!1451 --- app/views/calendar/single/_include_month.php | 12 ++++++++---- app/views/calendar/single/year.php | 14 +++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/views/calendar/single/_include_month.php b/app/views/calendar/single/_include_month.php index c749c2b6a6f..6942d2f02be 100644 --- a/app/views/calendar/single/_include_month.php +++ b/app/views/calendar/single/_include_month.php @@ -107,20 +107,24 @@ <? switch ($hday['col']) { case 1: ?><a class="<?= $style ?>day" href="<?= $controller->url_for($href, ['atime' => $i]) ?>" <?= tooltip($hday['name']) . $js_inc ?>> - <?= $aday ?> + <?= $aday ?> </a><? break; case 2: case 3; ?><a class="<?= $style ?>hday" href="<?= $controller->url_for($href, ['atime' => $i]) ?>" <?= tooltip($hday['name']) . $js_inc ?>> - <?= $aday ?> + <?= $aday ?> </a><? break; default: ?><a class="<?= $style ?>day" href="<?= $controller->url_for($href, ['atime' => $i]) ?>" <?= $js_inc ?>> - <?= $aday ?> + <?= $aday ?> </a> - <?}?> + <?}?> + <? else : ?> + <a class="<?= $style ?>day" href="<?= $controller->url_for($href, ['atime' => $i]) ?>" <?= $js_inc ?>> + <?= $aday ?> + </a> <? endif ?> </td> <? endif; ?> diff --git a/app/views/calendar/single/year.php b/app/views/calendar/single/year.php index 7f81fa79a96..0ebafe1431e 100644 --- a/app/views/calendar/single/year.php +++ b/app/views/calendar/single/year.php @@ -95,15 +95,15 @@ <? else : ?> <a style="font-weight:bold;" class="hday" href="<?= $controller->url_for('calendar/single/day', ['atime' => $aday]) ?>"><?= $i ?></a> <?= $weekday; ?> <? endif; ?> + <? endif ?> + <? else : ?> + <? if (date('w', $aday) == '0') : ?> + <a style="font-weight:bold;" class="sday" href="<?= $controller->url_for('calendar/single/day', ['atime' => $aday]) ?>"><?= $i ?></a> <?= $weekday; ?> + <? $count++; ?> <? else : ?> - <? if (date('w', $aday) == '0') : ?> - <a style="font-weight:bold;" class="sday" href="<?= $controller->url_for('calendar/single/day', ['atime' => $aday]) ?>"><?= $i ?></a> <?= $weekday; ?> - <? $count++; ?> - <? else : ?> - <a style="font-weight:bold;" class="day" href="<?= $controller->url_for('calendar/single/day', ['atime' => $aday]) ?>"><?= $i ?></a> <?= $weekday; ?> - <? endif; ?> + <a style="font-weight:bold;" class="day" href="<?= $controller->url_for('calendar/single/day', ['atime' => $aday]) ?>"><?= $i ?></a> <?= $weekday; ?> <? endif; ?> - <? endif ?> + <? endif; ?> </span> <? if (isset($count_list[$iday]) && count($count_list[$iday])) : ?> -- GitLab