Issue #10 - Added link to warning bar and info page.

This commit is contained in:
Daniel Thee Roperto
2016-09-08 14:31:51 +10:00
parent efee27af40
commit a4de5d6bf1
7 changed files with 138 additions and 10 deletions

View File

@@ -125,10 +125,23 @@ class auth_outage_renderer extends plugin_renderer_base {
);
}
public function renderbar($outage) {
global $PAGE;
public function renderoutagepage(outage $outage) {
$start = userdate($outage->starttime, get_string('strftimedatetimeshort'));
$stop = userdate($outage->stoptime, get_string('strftimedatetimeshort'));
$PAGE->requires->css(new moodle_url('/auth/outage/res/outage.css'));
return html_writer::div(
html_writer::tag('p',
html_writer::tag('b', 'From: ')
. $start
. html_writer::tag('b', ' Until: ')
. $stop
)
. html_writer::div($outage->description)
);
}
public function renderoutagebar(outage $outage) {
global $CFG;
$start = userdate($outage->starttime, get_string('strftimedatetimeshort'));
$stop = userdate($outage->stoptime, get_string('strftimedatetimeshort'));
@@ -140,15 +153,21 @@ class auth_outage_renderer extends plugin_renderer_base {
);
return
html_writer::div(
html_writer::tag('style', $CFG->auth_outage_css)
. html_writer::div(
html_writer::div(
html_writer::div($outage->title, 'auth_outage_warningbar_box_title')
. html_writer::div($message, 'auth_outage_warningbar_box_message'),
. html_writer::div(
$message . ' '
. html_writer::tag('small',
'[' . html_writer::link(new moodle_url('/auth/outage/info.php'), 'more') . ']'
),
'auth_outage_warningbar_box_message'
),
'auth_outage_warningbar_box'
),
'auth_outage_warningbar'
)
.
html_writer::div(' ', 'auth_outage_warningbar_spacer');
. html_writer::div(' ', 'auth_outage_warningbar_spacer');
}
}