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}} |