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 @@
- {foreach from=$services item=service} -
- {$service->name()} - {foreach from=$service->sites() item=site} - {assign var=incidents value=$site->openIncidents()} -
- {$site->name()} ({StatusBoard_Status::name($site->status())}) - {foreach from=$incidents item=incident} -
- {StatusBoard_Status::name($incident->currentStatus())}: {$incident->description()} -
- {/foreach} -
- {foreachelse} - + + + + + + + + + + + + + + + {foreach from=$services item=service} + + + + {foreach from=$service->sites() item=site} + {assign var=incidents value=$site->openIncidents()} + + + + + + + + + + + {foreachelse} + + + {/foreach} {/foreach} - - {/foreach} + +
ServiceCurrent{$day1}{$day2}{$day3}{$day4}{$day5}{$day6}
+ {$service->name} +
+ {$site->name} + + {StatusBoard_Status::name($site->status())} + goodgoodgoodgoodgoodgood
diff --git a/source/webui/templates/index.tpl b/source/webui/templates/index.tpl index 803279f..a168634 100644 --- a/source/webui/templates/index.tpl +++ b/source/webui/templates/index.tpl @@ -30,13 +30,13 @@
diff --git a/source/webui/templates/navigation.tpl b/source/webui/templates/navigation.tpl index 96cbfc9..031bb6b 100644 --- a/source/webui/templates/navigation.tpl +++ b/source/webui/templates/navigation.tpl @@ -1,4 +1,19 @@ - \ No newline at end of file +StatusBoard + + + +

+ Logged in as username +

\ No newline at end of file