mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-65671 calendar: tidy up calendar header
This commit is contained in:
parent
859bc931d8
commit
fed1cc738d
@ -297,7 +297,8 @@ class core_calendar_renderer extends plugin_renderer_base {
|
||||
}
|
||||
|
||||
$select = html_writer::label($label, 'course', false, ['class' => 'mr-1']);
|
||||
$select .= html_writer::select($courseoptions, 'course', $selected, false, ['class' => 'cal_courses_flt']);
|
||||
$select .= html_writer::select($courseoptions, 'course', $selected, false,
|
||||
['class' => 'cal_courses_flt mr-auto']);
|
||||
|
||||
return $select;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
{
|
||||
}
|
||||
}}
|
||||
<div class="header d-flex flex-wrap mb-5">
|
||||
<div class="header d-flex flex-wrap">
|
||||
{{> core_calendar/view_selector}}
|
||||
{{#filter_selector}}
|
||||
{{{filter_selector}}}
|
||||
|
@ -33,6 +33,6 @@
|
||||
}}
|
||||
<div class="calendarwrapper" data-view="upcoming" data-context-id="{{defaulteventcontext}}" data-courseid="{{courseid}}">
|
||||
{{> core/overlay_loading}}
|
||||
<h2 class="current">{{#str}}upcomingevents, core_calendar{{/str}}</h2>
|
||||
<h2 class="current text-center">{{#str}}upcomingevents, core_calendar{{/str}}</h2>
|
||||
{{> core_calendar/event_list }}
|
||||
</div>
|
||||
|
@ -26,9 +26,8 @@
|
||||
"viewingupcoming": false
|
||||
}
|
||||
}}
|
||||
<div class="dropdown mb-1" data-region="view-selector">
|
||||
<div data-region="view-selector">
|
||||
<button id="calendarviewdropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{#pix}} a/view_icon_active {{/pix}}
|
||||
<span class="d-sm-inline-block" data-active-item-text>
|
||||
{{#viewingmonth}}{{#str}} month {{/str}}{{/viewingmonth}}
|
||||
{{#viewingday}}{{#str}} day, core_calendar {{/str}}{{/viewingday}}
|
||||
|
@ -61,7 +61,9 @@ if (empty($time)) {
|
||||
$time = time();
|
||||
}
|
||||
|
||||
if ($courseid != SITEID) {
|
||||
$iscoursecalendar = $courseid != SITEID;
|
||||
|
||||
if ($iscoursecalendar) {
|
||||
$url->param('course', $courseid);
|
||||
}
|
||||
|
||||
@ -80,7 +82,7 @@ $PAGE->set_url($url);
|
||||
|
||||
$course = get_course($courseid);
|
||||
|
||||
if ($courseid != SITEID && !empty($courseid)) {
|
||||
if ($iscoursecalendar && !empty($courseid)) {
|
||||
navigation_node::override_active_url(new moodle_url('/course/view.php', array('id' => $course->id)));
|
||||
} else if (!empty($categoryid)) {
|
||||
core_course_category::get($categoryid); // Check that category exists and can be accessed.
|
||||
@ -115,7 +117,10 @@ switch($view) {
|
||||
// Print title and header
|
||||
$PAGE->set_pagelayout('standard');
|
||||
$PAGE->set_title("$course->shortname: $strcalendar: $pagetitle");
|
||||
$PAGE->set_heading($COURSE->fullname);
|
||||
|
||||
$headingstr = ($iscoursecalendar) ? get_string('coursecalendar', 'core_calendar', $COURSE->shortname) :
|
||||
get_string('calendar', 'core_calendar');
|
||||
$PAGE->set_heading($headingstr);
|
||||
|
||||
$renderer = $PAGE->get_renderer('core_calendar');
|
||||
$calendar->add_sidecalendar_blocks($renderer, true, $view);
|
||||
@ -123,7 +128,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'));
|
||||
|
||||
|
||||
|
||||
list($data, $template) = calendar_get_view($calendar, $view, true, false, $lookahead);
|
||||
|
@ -46,6 +46,7 @@ $string['course'] = 'Course';
|
||||
$string['courseevent'] = 'Course event';
|
||||
$string['courseevents'] = 'Course events';
|
||||
$string['categoryevents'] = 'Category events';
|
||||
$string['coursecalendar'] = '{$a} calendar';
|
||||
$string['courses'] = 'Courses';
|
||||
$string['customexport'] = 'Custom range ({$a->timestart} - {$a->timeend})';
|
||||
$string['daily'] = 'Daily';
|
||||
|
@ -437,3 +437,7 @@ table.calendartable caption {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.cal_courses_flt {
|
||||
color: #868e96;
|
||||
}
|
||||
|
@ -11677,6 +11677,9 @@ table.calendartable caption {
|
||||
.description-content > p {
|
||||
margin: 0; }
|
||||
|
||||
.cal_courses_flt {
|
||||
color: #868e96; }
|
||||
|
||||
/* course.less */
|
||||
/* COURSE CONTENT */
|
||||
.section-modchooser-link img {
|
||||
|
@ -11919,6 +11919,9 @@ table.calendartable caption {
|
||||
.description-content > p {
|
||||
margin: 0; }
|
||||
|
||||
.cal_courses_flt {
|
||||
color: #868e96; }
|
||||
|
||||
/* course.less */
|
||||
/* COURSE CONTENT */
|
||||
.section-modchooser-link img {
|
||||
|
Loading…
x
Reference in New Issue
Block a user