Add basic service/site/incident listings to the homepage.
Basic functionality to serve as a test case for core class development.
This commit is contained in:
@@ -90,3 +90,19 @@ label {
|
|||||||
color: darkblue;
|
color: darkblue;
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page specific content
|
||||||
|
*/
|
||||||
|
|
||||||
|
div.service {
|
||||||
|
border-top: 1px solid grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.site {
|
||||||
|
margin-left: 5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.incident {
|
||||||
|
margin-left: 2em;
|
||||||
|
}
|
||||||
7
source/webui/pages/home.php
Normal file
7
source/webui/pages/home.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$services = StatusBoard_Service::all();
|
||||||
|
|
||||||
|
$this->smarty->assign('services', $services);
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -1 +1,20 @@
|
|||||||
TODO
|
<div id="statusboard">
|
||||||
|
{foreach from=$services item=service}
|
||||||
|
<div class="service">
|
||||||
|
{$service->name()}
|
||||||
|
{foreach from=$service->sites() item=site}
|
||||||
|
{assign var=incidents value=$site->incidents_open()}
|
||||||
|
<div class="site">
|
||||||
|
{$site->name()} ({$incidents|count})
|
||||||
|
{foreach from=$incidents item=incident}
|
||||||
|
<div class="incident">
|
||||||
|
{$incident->description()}
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{foreachelse}
|
||||||
|
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user