Updated generation of previous days in heading on home template, now looped into array then passed to smarty
Signed-off-by: Nathan Booth <nath.booth@gmail.com>
This commit is contained in:
@@ -3,12 +3,9 @@
|
|||||||
$services = StatusBoard_Service::all();
|
$services = StatusBoard_Service::all();
|
||||||
|
|
||||||
for ($i = 1; $i <= 6; ++$i){
|
for ($i = 1; $i <= 6; ++$i){
|
||||||
$day = 'day'.$i;
|
$tbl_header_date[] = date("M. d", strtotime("-{$i}day"));
|
||||||
$date = date("M. d", strtotime("-{$i}day"));
|
|
||||||
|
|
||||||
$this->smarty->assign($day, $date);
|
|
||||||
}
|
}
|
||||||
|
$this->smarty->assign('days', $tbl_header_date);
|
||||||
$this->smarty->assign('services', $services);
|
$this->smarty->assign('services', $services);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -4,12 +4,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Service</th>
|
<th>Service</th>
|
||||||
<th class="status">Current</th>
|
<th class="status">Current</th>
|
||||||
<th class="status">{$day1}</th>
|
{foreach from=$days key="ind" item="day"}
|
||||||
<th class="status">{$day2}</th>
|
<th class="status">{$day}</th>
|
||||||
<th class="status">{$day3}</th>
|
{/foreach}
|
||||||
<th class="status">{$day4}</th>
|
|
||||||
<th class="status">{$day5}</th>
|
|
||||||
<th class="status">{$day6}</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user