MDL-63119 calendar: now showing event end in modal

When clicking on an event in the month view, a modal opens with
    information about it. That modal did previously only show the start time
    of the event. It now also shows the end (if the event has one).
This commit is contained in:
Tim Schroeder
2018-09-18 11:40:07 +08:00
committed by Simey Lameze
parent 674ef9baac
commit d2111dbccf
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -92,6 +92,10 @@ class event_exporter extends event_exporter_base {
}
$values['url'] = $url->out(false);
// Override default formatted time to make sure the date portion of the time is always rendered.
$legacyevent = container::get_event_mapper()->from_event_to_legacy_event($event);
$values['formattedtime'] = calendar_format_event_time($legacyevent, time(), null, false);
if ($event instanceof action_event_interface) {
$actionrelated = [
'context' => $context,
@@ -42,7 +42,7 @@
<div class="container-fluid">
<div class="row">
<div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
<div class="col-xs-11">{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}</div>
<div class="col-xs-11">{{{formattedtime}}}</div>
</div>
<div class="row m-t-1">
<div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>