Add a "today" column to the Staus Board
This commit is contained in:
@@ -1,12 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$services = StatusBoard_Service::all();
|
$services = StatusBoard_Service::all();
|
||||||
|
|
||||||
for ($i = 1; $i <= 6; ++$i){
|
|
||||||
$tbl_header_date[] = date("M. d", strtotime("-{$i}day"));
|
|
||||||
}
|
|
||||||
$this->smarty->assign('days', $tbl_header_date);
|
|
||||||
$this->smarty->assign('services', $services);
|
$this->smarty->assign('services', $services);
|
||||||
$this->smarty->assign('requested_page', $this->page);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -4,15 +4,19 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Service</th>
|
<th>Service</th>
|
||||||
<th class="status">Now</th>
|
<th class="status">Now</th>
|
||||||
{foreach from=$days key="ind" item="day"}
|
{foreach from=array(0,1,2,3,4,5,6) item=day}
|
||||||
<th class="status">{$day}</th>
|
{if $day == 0}
|
||||||
|
<th class="status">Today</th>
|
||||||
|
{else}
|
||||||
|
<th class="status">{mktime(0,0,0,date("n"),date("j")-$day)|date_format:"M j"}</th>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach from=$services item=service}
|
{foreach from=$services item=service}
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="8" class="service">
|
<th colspan="9" class="service">
|
||||||
{$service->name}
|
{$service->name}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -26,9 +30,9 @@
|
|||||||
{$status=$site->status()}
|
{$status=$site->status()}
|
||||||
{include file="fragments/site-status.tpl" nocache start=null end=null}
|
{include file="fragments/site-status.tpl" nocache start=null end=null}
|
||||||
</td>
|
</td>
|
||||||
{foreach from=array(1,2,3,4,5,6) item=day}
|
{foreach from=array(0,1,2,3,4,5,6) item=day}
|
||||||
{$start=mktime(0,0,0,date("n"),date("j")-$day-1)}
|
{$start=mktime(0,0,0,date("n"),date("j")-$day)}
|
||||||
{$end=mktime(0,0,0,date("n"),date("j")-$day)}
|
{$end=mktime(0,0,0,date("n"),date("j")-$day+1)}
|
||||||
{$incidentsDuring=$site->openIncidentsDuring($start, $end)}
|
{$incidentsDuring=$site->openIncidentsDuring($start, $end)}
|
||||||
{$statusDuring=StatusBoard_Incident::highestSeverityStatus($incidentsDuring, $end)}
|
{$statusDuring=StatusBoard_Incident::highestSeverityStatus($incidentsDuring, $end)}
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user