mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-60558 block_calendar_upcoming: Render the template when no events
This commit is contained in:
parent
e3491a093a
commit
43caf0217f
@ -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 = '<div class="post">'. get_string('noupcomingevents', 'calendar').'</div>';
|
||||
} else {
|
||||
$this->content->text .= $renderer->render_from_template($template, $data);
|
||||
}
|
||||
$this->content->text .= $renderer->render_from_template($template, $data);
|
||||
|
||||
$this->content->footer = '<div class="gotocal">
|
||||
<a href="'.$CFG->wwwroot.'/calendar/view.php?view=upcoming&course='.$courseid.'">'.
|
||||
|
@ -55,6 +55,9 @@
|
||||
<hr>
|
||||
</div>
|
||||
{{/events}}
|
||||
{{^events}}
|
||||
{{#str}}noupcomingevents, calendar{{/str}}
|
||||
{{/events}}
|
||||
</div>
|
||||
{{#js}}
|
||||
require([
|
||||
|
Loading…
x
Reference in New Issue
Block a user