Skip to content

Commit

Permalink
MDL-49052 core_calendar: Improved headings on upcomming events pages
Browse files Browse the repository at this point in the history
  • Loading branch information
marsh0lion committed Feb 5, 2015
1 parent 4c27f52 commit 136f8f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions calendar/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion calendar/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -169,4 +170,4 @@
echo $OUTPUT->container_end();
echo html_writer::end_tag('div');
echo $renderer->complete_layout();
echo $OUTPUT->footer();
echo $OUTPUT->footer();

0 comments on commit 136f8f0

Please sign in to comment.