Skip to content

Commit

Permalink
MDL-46643 calendar: improved tab order of calendar detail pages
Browse files Browse the repository at this point in the history
  • Loading branch information
marsh0lion committed Jul 31, 2014
1 parent d29fb4a commit 712e5f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions calendar/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ public function show_day(calendar_information $calendar, moodle_url $returnurl =
$events = calendar_get_upcoming($calendar->courses, $calendar->groups, $calendar->users, 1, 100, $calendar->timestamp_today());

$output = html_writer::start_tag('div', array('class'=>'header'));
$output .= $this->course_filter_selector($returnurl, get_string('dayviewfor', 'calendar'));
if (calendar_user_can_add_event($calendar->course)) {
$output .= $this->add_event_button($calendar->course->id, 0, 0, 0, $calendar->time);
}
$output .= $this->course_filter_selector($returnurl, get_string('dayviewfor', 'calendar'));
$output .= html_writer::end_tag('div');
// Controls
$output .= html_writer::tag('div', calendar_top_controls('day', array('id' => $calendar->courseid, 'time' => $calendar->time)), array('class'=>'controls'));
Expand Down Expand Up @@ -464,10 +464,10 @@ public function show_month_detailed(calendar_information $calendar, moodle_url $
calendar_events_by_day($events, $date['mon'], $date['year'], $eventsbyday, $durationbyday, $typesbyday, $calendar->courses);

$output = html_writer::start_tag('div', array('class'=>'header'));
$output .= $this->course_filter_selector($returnurl, get_string('detailedmonthviewfor', 'calendar'));
if (calendar_user_can_add_event($calendar->course)) {
$output .= $this->add_event_button($calendar->course->id, 0, 0, 0, $calendar->time);
}
$output .= $this->course_filter_selector($returnurl, get_string('detailedmonthviewfor', 'calendar'));
$output .= html_writer::end_tag('div', array('class'=>'header'));
// Controls
$output .= html_writer::tag('div', calendar_top_controls('month', array('id' => $calendar->courseid, 'time' => $calendar->time)), array('class' => 'controls'));
Expand Down Expand Up @@ -614,10 +614,10 @@ public function show_upcoming_events(calendar_information $calendar, $futuredays
$events = calendar_get_upcoming($calendar->courses, $calendar->groups, $calendar->users, $futuredays, $maxevents);

$output = html_writer::start_tag('div', array('class'=>'header'));
$output .= $this->course_filter_selector($returnurl, get_string('upcomingeventsfor', 'calendar'));
if (calendar_user_can_add_event($calendar->course)) {
$output .= $this->add_event_button($calendar->course->id);
}
$output .= $this->course_filter_selector($returnurl, get_string('upcomingeventsfor', 'calendar'));
$output .= html_writer::end_tag('div');

if ($events) {
Expand Down
2 changes: 2 additions & 0 deletions theme/base/style/calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
.dir-rtl.path-calendar .maincalendar .header .buttons {float: left;}
.path-calendar .filters table {border-collapse:separate;border-spacing: 2px;width: 100%;}
#page-calendar-export .indent {padding-left: 20px;}
.path-calendar div.cal_courses_flt { float: left; }
.dir-rtl.path-calendar div.cal_courses_flt { float: right; }
.path-calendar .cal_courses_flt label { margin-right: .45em; }
.dir-rtl.path-calendar .cal_courses_flt label { margin-left: .45em; margin-right: 0; }

Expand Down
3 changes: 3 additions & 0 deletions theme/bootstrapbase/less/moodle/calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
}
}
.cal_courses_flt {
float: left;

label {
margin-right: .45em;
}
Expand Down Expand Up @@ -217,6 +219,7 @@
// RTL overrides for main calendar.
.dir-rtl.path-calendar {
.cal_courses_flt {
float: right;
label {
margin-left: .45em;
margin-right: 0;
Expand Down
2 changes: 1 addition & 1 deletion theme/bootstrapbase/style/moodle.css

Large diffs are not rendered by default.

0 comments on commit 712e5f2

Please sign in to comment.