diff --git a/source/webui/pages/home.php b/source/webui/pages/home.php index 7d6468e..2f3accf 100644 --- a/source/webui/pages/home.php +++ b/source/webui/pages/home.php @@ -2,6 +2,13 @@ $services = StatusBoard_Service::all(); +for ($i = 1; $i <= 6; ++$i){ + $day = 'day'.$i; + $date = date("M. d", strtotime("-{$i}day")); + + $this->smarty->assign($day, $date); +} + $this->smarty->assign('services', $services); ?> \ No newline at end of file diff --git a/source/webui/pages/navigation.php b/source/webui/pages/navigation.php new file mode 100644 index 0000000..5d61883 --- /dev/null +++ b/source/webui/pages/navigation.php @@ -0,0 +1,18 @@ +auth(); +if ($auth->isAuthenticated()) { + $display_login = false; +} + +if ($auth->isAdministrator()) { + $display_admin = true; +} + +$this->smarty->assign('display_login', $display_login); +$this->smarty->assign('display_admin', $display_admin); + +?> \ No newline at end of file diff --git a/source/webui/templates/home.tpl b/source/webui/templates/home.tpl index b883b16..38f94b4 100644 --- a/source/webui/templates/home.tpl +++ b/source/webui/templates/home.tpl @@ -1,20 +1,45 @@
| Service | +Current | +{$day1} | +{$day2} | +{$day3} | +{$day4} | +{$day5} | +{$day6} | +
|---|---|---|---|---|---|---|---|
| + {$service->name} + | +|||||||
| + {$site->name} + | ++ {StatusBoard_Status::name($site->status())} + | +good | +good | +good | +good | +good | +good | +
+ Logged in as username +
\ No newline at end of file