Issue #11 - Standard manage table implemented, all outages still on the same table.

This commit is contained in:
Daniel Thee Roperto
2016-09-12 11:12:12 +10:00
parent 7edefc8462
commit 96f9bb7ec2
6 changed files with 148 additions and 28 deletions

View File

@@ -43,31 +43,6 @@ class auth_outage_renderer extends plugin_renderer_base {
. $this->renderoutage($outage, false);
}
public function renderoutagelist(array $outages) {
global $OUTPUT;
$html = $this->rendersubtitle('outageslist');
// Generate list of outages.
foreach ($outages as $outage) {
$html .= $this->renderoutage($outage, true);
}
// Add 'add' button.
$url = new moodle_url('/auth/outage/new.php');
$img = html_writer::empty_tag('img',
['src' => $OUTPUT->pix_url('t/add'), 'alt' => get_string('create'), 'class' => 'iconsmall']);
$html .= html_writer::tag('p',
html_writer::link(
$url,
$img . ' ' . get_string('outagecreate', 'auth_outage'),
['title' => get_string('delete')]
)
);
return $html;
}
private function renderoutage(outage $outage, $buttons) {
global $OUTPUT;