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.
This commit is contained in:
Simey Lameze 2021-07-21 13:45:31 +08:00
parent b0133904bf
commit d748c71693
2 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -46,7 +46,12 @@
<span class="arrow_text">{{previousperiodname}}</span>
</a>
<span class="hide"> | </span>
<h2 class="current">{{periodname}}</h2>
{{#viewinginblock}}
<h4 class="current">{{periodname}}</h4>
{{/viewinginblock}}
{{^viewinginblock}}
<h2 class="current">{{periodname}}</h2>
{{/viewinginblock}}
<span class="hide"> | </span>
<a{{!
}} href="{{nextperiodlink}}"{{!