MDL-49052 core_calendar: Improved headings on upcomming events pages

This commit is contained in:
Brian Barnes
2015-02-05 14:58:59 +13:00
parent 4c27f52d91
commit 136f8f09a4
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -176,7 +176,7 @@ class core_calendar_renderer extends plugin_renderer_base {
if (empty($events)) {
// There is nothing to display today.
$output .= $this->output->heading(get_string('daywithnoevents', 'calendar'), 3);
$output .= html_writer::span(get_string('daywithnoevents', 'calendar'), 'calendar-information calendar-no-results');
} else {
$output .= html_writer::start_tag('div', array('class' => 'eventlist'));
$underway = array();
@@ -194,7 +194,8 @@ class core_calendar_renderer extends plugin_renderer_base {
// Then, show a list of all events that just span this day
if (!empty($underway)) {
$output .= $this->output->heading(get_string('spanningevents', 'calendar'), 3);
$output .= html_writer::span(get_string('spanningevents', 'calendar'),
'calendar-information calendar-span-multiple-days');
foreach ($underway as $event) {
$event->time = calendar_format_event_time($event, time(), null, false, $calendar->timestamp_today());
$output .= $this->event($event);
@@ -536,7 +537,7 @@ class core_calendar_renderer extends plugin_renderer_base {
}
$output .= html_writer::end_tag('div');
} else {
$output .= $this->output->heading(get_string('noupcomingevents', 'calendar'));
$output .= html_writer::span(get_string('noupcomingevents', 'calendar'), 'calendar-information calendar-no-results');
}
return $output;
+2 -1
View File
@@ -124,6 +124,7 @@ $calendar->add_sidecalendar_blocks($renderer, true, $view);
echo $OUTPUT->header();
echo $renderer->start_layout();
echo html_writer::start_tag('div', array('class'=>'heightcontainer'));
echo $OUTPUT->heading(get_string('calendar', 'calendar'));
switch($view) {
case 'day':
@@ -169,4 +170,4 @@ if (!empty($CFG->enablecalendarexport)) {
echo $OUTPUT->container_end();
echo html_writer::end_tag('div');
echo $renderer->complete_layout();
echo $OUTPUT->footer();
echo $OUTPUT->footer();