2014-10-22 11:22:47 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend>Room Summary next <?php echo $days; ?> Days</legend>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-md-2 control-label" for="Title">Select Date</label>
|
|
|
|
<div class="col-md-2">
|
|
|
|
<div class="input-group date" id="date" data-date="<?php echo $x=Site::date($date); ?>" data-date-format="dd-mm-yyyy" data-date-autoclose="true" data-provide="datepicker">
|
|
|
|
<?php echo Form::input('date',$x,array('id'=>'caldate','class'=>'form-control','required','nocg'=>TRUE,'readonly','onchange'=>'submit()')); ?>
|
|
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<table class="table table-striped table-condensed table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th colspan="2"> </th>
|
|
|
|
<th><?php echo HTML::anchor(sprintf('%s?date=%s',$uri,date('d-m-Y',$date-86400*7)),'<<'); ?></th>
|
|
|
|
|
|
|
|
<?php foreach (array_keys($open_dates) as $day) : ?>
|
|
|
|
<th class="text-right"><?php printf('%s (%s)',Site::date($day),date('D',$day)); ?></th>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
<th><?php echo HTML::anchor(sprintf('%s?date=%s',$uri,date('d-m-Y',$date+86400*7)),'>>'); ?></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
<!-- Site Open -->
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">Open</th>
|
|
|
|
<th> </th>
|
|
|
|
|
|
|
|
<?php foreach (array_keys($open_dates) as $day) : ?>
|
|
|
|
<td class="text-right"><?php echo StaticList_YesNo::factory()->get(isset($open_dates[$day]) ? $open_dates[$day] : FALSE,TRUE); ?></td>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<!-- Total Places -->
|
|
|
|
<tr>
|
|
|
|
<th colspan="2">Total</th>
|
|
|
|
<th> </th>
|
|
|
|
|
|
|
|
<?php foreach (array_keys($total_places) as $day) : ?>
|
|
|
|
<td class="text-right"><?php echo $total_places[$day]; ?></td>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
2014-12-01 03:01:02 +00:00
|
|
|
<!-- Available Places -->
|
|
|
|
<tr class="info">
|
|
|
|
<th colspan="2">Availability</th>
|
|
|
|
<th> </th>
|
|
|
|
|
|
|
|
<?php foreach (array_keys($available_places) as $day) : ?>
|
|
|
|
<td class="text-right"><?php echo $available_places[$day]; ?></td>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
2014-10-22 11:22:47 +00:00
|
|
|
<!-- Unprocessed Waitlists -->
|
2014-12-01 03:01:02 +00:00
|
|
|
<tr class="danger">
|
2014-10-22 11:22:47 +00:00
|
|
|
<th colspan="2">New Applications</th>
|
|
|
|
<th> </th>
|
|
|
|
|
2014-12-01 03:01:02 +00:00
|
|
|
<?php foreach (array_values(ORM::factory('Rooms')->child_list_date($date,$days,'w')) as $x) : ?>
|
2014-10-22 11:22:47 +00:00
|
|
|
<td class="text-right"><?php echo count($x); ?></td>
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<!-- Breakdown for each Room -->
|
|
|
|
<?php foreach ($r as $ro) : ?>
|
|
|
|
<tr><th colspan="<?php echo $days+4; ?>"> </th></tr>
|
|
|
|
|
|
|
|
<tr><th colspan="2"><?php echo $ro->display('name'); ?></th><th colspan="<?php echo $days+2; ?>"> </th></tr>
|
|
|
|
|
|
|
|
<!-- Capacity -->
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td>Capacity</td>
|
|
|
|
<td> </td>
|
|
|
|
<td class="text-right"><?php echo join('</td><td class="text-right">',array_values($ro->availability_dates($date,$days))); ?></td>
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
2014-12-01 03:01:02 +00:00
|
|
|
<?php foreach (array(
|
|
|
|
'P'=>'Permanent',
|
|
|
|
'a'=>'Absent',
|
|
|
|
'C'=>'Casual',
|
|
|
|
) as $code => $title) : ?>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td><?php echo HTML::anchor(URL::link('director',sprintf('room/list/%s:%s:%s:7',$ro->id,$date,$code)),$title); ?></td>
|
|
|
|
<td> </td>
|
|
|
|
<?php foreach ($ro->child_list_date($date,$days,$code) as $day=>$x) : ?>
|
|
|
|
<td class="text-right"><?php echo HTML::anchor(URL::link('director',sprintf('room/list/%s:%s:%s:1',$ro->id,$day,$code)),count($x)); ?></td>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
2014-10-22 11:22:47 +00:00
|
|
|
|
2014-12-01 03:01:02 +00:00
|
|
|
<tr><th colspan="<?php echo $days+4; ?>"> </th></tr>
|
2014-10-22 11:22:47 +00:00
|
|
|
|
2014-12-01 03:01:02 +00:00
|
|
|
<!-- Waitlist -->
|
|
|
|
<tr class="danger">
|
2014-10-22 11:22:47 +00:00
|
|
|
<td> </td>
|
2014-12-01 03:01:02 +00:00
|
|
|
<td><?php echo HTML::anchor(URL::link('director','room/list/'.$ro->id.':'.$date.':w:7'),'Waitlist'); ?></td>
|
2014-10-22 11:22:47 +00:00
|
|
|
<td> </td>
|
2014-12-01 03:01:02 +00:00
|
|
|
<?php foreach ($ro->child_list_date($date,$days,'w') as $day=>$x) : ?>
|
|
|
|
<td class="text-right"><?php echo HTML::anchor(URL::link('director','room/list/'.$ro->id.':'.$day.':w:1'),count($x)); ?></td>
|
2014-10-22 11:22:47 +00:00
|
|
|
<?php endforeach ?>
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
2014-12-01 03:01:02 +00:00
|
|
|
<td><?php echo HTML::anchor(URL::link('director','room/list/'.$ro->id.':'.$date.':w:7'),'Casual Request'); ?></td>
|
2014-10-22 11:22:47 +00:00
|
|
|
<td> </td>
|
2014-12-01 03:01:02 +00:00
|
|
|
<?php foreach ($ro->child_list_date($date,$days,'c') as $day=>$x) : ?>
|
|
|
|
<td class="text-right"><?php echo HTML::anchor(URL::link('director','room/list/'.$ro->id.':'.$day.':c:1'),count($x)); ?></td>
|
2014-10-22 11:22:47 +00:00
|
|
|
<?php endforeach ?>
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<!-- Availability -->
|
2014-12-01 03:01:02 +00:00
|
|
|
<tr class="info">
|
2014-10-22 11:22:47 +00:00
|
|
|
<td> </td>
|
|
|
|
<td>Availability</td>
|
|
|
|
<td> </td>
|
|
|
|
<?php foreach (array_values($ro->room_availablity($date,$days)) as $x) : ?>
|
|
|
|
<td class="text-right"><?php echo $x; ?></td>
|
|
|
|
<?php endforeach ?>
|
|
|
|
<th> </th>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|