From 136f8f09a440cf117b70fa6841b39f1b8f3fe22a Mon Sep 17 00:00:00 2001 From: Brian Barnes Date: Mon, 2 Feb 2015 12:06:31 +1300 Subject: [PATCH] MDL-49052 core_calendar: Improved headings on upcomming events pages --- calendar/renderer.php | 7 ++++--- calendar/view.php | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/calendar/renderer.php b/calendar/renderer.php index bc9d7d59a9cd4..46e6c569444d2 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -176,7 +176,7 @@ public function show_day(calendar_information $calendar, moodle_url $returnurl = 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 @@ public function show_day(calendar_information $calendar, moodle_url $returnurl = // 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 @@ public function show_upcoming_events(calendar_information $calendar, $futuredays } $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; diff --git a/calendar/view.php b/calendar/view.php index 469cbf9aa9e47..5121a98aa7f4a 100644 --- a/calendar/view.php +++ b/calendar/view.php @@ -124,6 +124,7 @@ 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 @@ echo $OUTPUT->container_end(); echo html_writer::end_tag('div'); echo $renderer->complete_layout(); -echo $OUTPUT->footer(); \ No newline at end of file +echo $OUTPUT->footer();