65 lines
2.8 KiB
PHP
65 lines
2.8 KiB
PHP
<tr>
|
|
<?php echo Form::hidden(sprintf('room[%s][id]',$row),$rco->id); ?>
|
|
|
|
<td><?php
|
|
switch ($type) {
|
|
case 'r':
|
|
echo ' ';
|
|
break;
|
|
|
|
default:
|
|
echo ($rco->id) ? $rco->room->display('name') : Form::select(sprintf('room[%s][room_id]',$row),ORM::factory('Rooms')->list_select(TRUE),$rco->room_id,array('class'=>'form-control','nocg'=>TRUE));
|
|
}
|
|
?></td>
|
|
|
|
<td><?php
|
|
switch ($type) {
|
|
case 'a':
|
|
case 'c':
|
|
case 'P':
|
|
case 'r':
|
|
case 'w':
|
|
case 'W':
|
|
echo StaticList_Room_Children::get($type);
|
|
echo Form::hidden(sprintf('room[%s][code]',$row),$type);
|
|
break;
|
|
default:
|
|
echo ($rco->id) ? StaticList_Room_Children::get($rco->code) : StaticList_Room_Children::form(sprintf('room[%s][code]',$row),$rco->code ? $rco->code : $type,FALSE,array('class'=>'form-control','nocg'=>TRUE));
|
|
}
|
|
?></td>
|
|
|
|
<?php foreach ($so->open_days() as $d => $open) : ?>
|
|
<td class="text-center <?php echo $open ? 'bg-success' : 'bg-danger'; ?>">
|
|
<?php if ($rco->loaded()) : ?>
|
|
<?php if (! $open) : ?>
|
|
<i class="fa fa-times text-danger"></i>
|
|
<?php elseif ($rco->day($d)): ?>
|
|
<?php if (in_array($rco->code,array('a','P','w','c'))) : ?>
|
|
<?php echo Form::checkbox(sprintf('room[%s][d_%s]',$row,$d),TRUE,$rco->day($d) ? TRUE : FALSE,array('nocg'=>TRUE,($open ? '': 'disabled'))); ?>
|
|
<?php else : ?>
|
|
<i class="fa fa-check text-success"></i>
|
|
<?php endif ?>
|
|
<?php else : ?>
|
|
<?php if (in_array($rco->code,array('C'))) : ?>
|
|
<?php echo Form::checkbox(sprintf('room[%s][d_%s]',$row,$d),TRUE,$rco->day($d) ? TRUE : FALSE,array('nocg'=>TRUE,($open ? '': 'disabled'))); ?>
|
|
<?php else : ?>
|
|
|
|
<?php endif ?>
|
|
<?php endif ?>
|
|
|
|
<?php else : ?>
|
|
<?php echo Form::checkbox(sprintf('room[%s][d_%s]',$row,$d),TRUE,$rco->day($d) ? TRUE : FALSE,array('nocg'=>TRUE,($open ? '': 'disabled'))); ?>
|
|
<?php endif ?>
|
|
</td>
|
|
<?php endforeach ?>
|
|
|
|
<td>
|
|
<div class="input-group input-daterange date" data-date-format="dd-mm-yyyy" data-provide="datepicker" data-date-start-view="year" data-date-autoclose="true" data-date-today-highlight="true" <?php if ($o->loaded()) : ?>data-date-start-date="<?php echo $o->display('dob'); ?>" data-date-end-date="<?php echo $o->date_enrol_max(TRUE); ?>" <?php endif ?>data-date-today-btn="true">
|
|
<div class="input-group-addon"><i class="fa fa-calendar"></i></div>
|
|
<?php echo Form::input(sprintf('room[%s][date_start]',$row),$rco->date_start ? $rco->display('date_start') : Site::Date(time()),array('class'=>'form-control','placeholder'=>'Start','nocg'=>TRUE,'readonly')); ?>
|
|
<span class="input-group-addon"> to </span>
|
|
<?php echo Form::input(sprintf('room[%s][date_stop]',$row),$rco->date_stop ? $rco->display('date_stop') : '',array('class'=>'form-control','placeholder'=>'End','nocg'=>TRUE,'readonly')); ?>
|
|
</div>
|
|
</td>
|
|
</tr>
|