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:
@@ -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);
|
||||
|
||||
@@ -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}}"{{!
|
||||
|
||||
Reference in New Issue
Block a user