From e527a7db8e601df775f4cc8ebc42511bd2d4849f Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Wed, 21 Dec 2011 14:14:08 +0000 Subject: [PATCH] Add a "today" column to the Staus Board --- source/webui/pages/home.php | 6 ------ source/webui/templates/home.tpl | 16 ++++++++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/source/webui/pages/home.php b/source/webui/pages/home.php index 745c8fa..22216e9 100644 --- a/source/webui/pages/home.php +++ b/source/webui/pages/home.php @@ -1,12 +1,6 @@ smarty->assign('days', $tbl_header_date); $this->smarty->assign('services', $services); -$this->smarty->assign('requested_page', $this->page); ?> \ No newline at end of file diff --git a/source/webui/templates/home.tpl b/source/webui/templates/home.tpl index 4d3c960..67867b1 100644 --- a/source/webui/templates/home.tpl +++ b/source/webui/templates/home.tpl @@ -4,15 +4,19 @@ Service Now - {foreach from=$days key="ind" item="day"} - {$day} + {foreach from=array(0,1,2,3,4,5,6) item=day} + {if $day == 0} + Today + {else} + {mktime(0,0,0,date("n"),date("j")-$day)|date_format:"M j"} + {/if} {/foreach} {foreach from=$services item=service} - + {$service->name} @@ -26,9 +30,9 @@ {$status=$site->status()} {include file="fragments/site-status.tpl" nocache start=null end=null} - {foreach from=array(1,2,3,4,5,6) item=day} - {$start=mktime(0,0,0,date("n"),date("j")-$day-1)} - {$end=mktime(0,0,0,date("n"),date("j")-$day)} + {foreach from=array(0,1,2,3,4,5,6) item=day} + {$start=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)} {$statusDuring=StatusBoard_Incident::highestSeverityStatus($incidentsDuring, $end)}