diff --git a/blocks/calendar_upcoming/block_calendar_upcoming.php b/blocks/calendar_upcoming/block_calendar_upcoming.php index 0d6fc79c132..e0e0267f78d 100644 --- a/blocks/calendar_upcoming/block_calendar_upcoming.php +++ b/blocks/calendar_upcoming/block_calendar_upcoming.php @@ -65,11 +65,7 @@ class block_calendar_upcoming extends block_base { list($data, $template) = calendar_get_view($calendar, 'upcoming_mini'); - if (empty($data->events)) { - $this->content->text = '
'. get_string('noupcomingevents', 'calendar').'
'; - } else { - $this->content->text .= $renderer->render_from_template($template, $data); - } + $this->content->text .= $renderer->render_from_template($template, $data); $this->content->footer = '
'. diff --git a/calendar/templates/upcoming_mini.mustache b/calendar/templates/upcoming_mini.mustache index 1be33f73968..082d5bcd922 100644 --- a/calendar/templates/upcoming_mini.mustache +++ b/calendar/templates/upcoming_mini.mustache @@ -55,6 +55,9 @@
{{/events}} + {{^events}} + {{#str}}noupcomingevents, calendar{{/str}} + {{/events}} {{#js}} require([