From d748c71693ea4f9bae13433b69ce2ca38c68bd0a Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Wed, 21 Jul 2021 13:45:31 +0800 Subject: [PATCH] MDL-71817 calendar: change the calendar heading to h4 in the block This commit adds the logic that change the size of the calendar header depending if the user is viewing in the block or in the full view. --- calendar/lib.php | 1 + calendar/templates/month_navigation.mustache | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/calendar/lib.php b/calendar/lib.php index 8a05c8ebb50..ee86d968e63 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -3501,6 +3501,7 @@ function calendar_get_view(\calendar_information $calendar, $view, $includenavig $data = $month->export($renderer); $data->viewingmonth = true; $data->showviewselector = ($view == "month"); + $data->viewinginblock = ($view == "monthblock"); } else if ($view == "day") { $day = new \core_calendar\external\calendar_day_exporter($calendar, $related); $data = $day->export($renderer); diff --git a/calendar/templates/month_navigation.mustache b/calendar/templates/month_navigation.mustache index 695b241ac26..89dcfcf13bc 100644 --- a/calendar/templates/month_navigation.mustache +++ b/calendar/templates/month_navigation.mustache @@ -46,7 +46,12 @@ {{previousperiodname}} | -

{{periodname}}

+ {{#viewinginblock}} +

{{periodname}}

+ {{/viewinginblock}} + {{^viewinginblock}} +

{{periodname}}

+ {{/viewinginblock}} |