141 lines
4.1 KiB
PHP
141 lines
4.1 KiB
PHP
<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>
|
|
|
|
<!-- Unprocessed Waitlists -->
|
|
<tr>
|
|
<th colspan="2">New Applications</th>
|
|
<th> </th>
|
|
|
|
<?php foreach (array_values(ORM::factory('Rooms')->child_list_date($date,$days,'W')) as $x) : ?>
|
|
<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>
|
|
|
|
<!-- Permanents -->
|
|
<tr>
|
|
<td> </td>
|
|
<td>Permanent</td>
|
|
<td> </td>
|
|
<?php foreach (array_values($ro->child_list_date($date,$days)) as $x) : ?>
|
|
<td class="text-right"><?php echo count($x); ?></td>
|
|
<?php endforeach ?>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
<!-- Absent -->
|
|
<tr>
|
|
<td> </td>
|
|
<td>Absent</td>
|
|
<td> </td>
|
|
<?php foreach (array_values($ro->child_list_date($date,$days,'a')) as $x) : ?>
|
|
<td class="text-right"><?php echo count($x); ?></td>
|
|
<?php endforeach ?>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
<!-- Casual -->
|
|
<tr>
|
|
<td> </td>
|
|
<td>Casual</td>
|
|
<td> </td>
|
|
<?php foreach (array_values($ro->child_list_date($date,$days,'C')) as $x) : ?>
|
|
<td class="text-right"><?php echo count($x); ?></td>
|
|
<?php endforeach ?>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
<tr><th colspan="<?php echo $days+4; ?>"> </th></tr>
|
|
|
|
<!-- Waitlist -->
|
|
<tr>
|
|
<td> </td>
|
|
<td>Waitlist</td>
|
|
<td> </td>
|
|
<?php foreach (array_values($ro->child_list_date($date,$days,'W')) as $x) : ?>
|
|
<td class="text-right"><?php echo count($x); ?></td>
|
|
<?php endforeach ?>
|
|
<th> </th>
|
|
</tr>
|
|
|
|
<!-- Availability -->
|
|
<tr>
|
|
<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>
|