<section class="content-header">
    <h1><i class='fa-fw fa fa-clock-o'></i> <?php echo $_translator->_getTranslation('Lista de progamacion de horarios');?></small></h1>
    <ol class="breadcrumb">
        <li><a href="<?php echo ROOT_HOST?>/Controller/Home.php"><i class="fa fa-dashboard"></i><?php echo $_translator->_getTranslation('Inicio')?></a></li>
        <li class="active"><?php echo $_translator->_getTranslation('Lista de programacion de horarios');?></li>
    </ol>
</section>
<section class="content">
<div class="box">
  <div class="box-header with-border">
    <h3 class="box-title"></h3>
    <div class="box-tools pull-right">
        <a href="ScheduleEmployee.php" class="btn btn-default pull-right"><i class='fa fa-plus'></i> <?php echo $_translator->_getTranslation('Agregar programacion de horarios')?></a> 
    </div><!-- /.box-tools -->
  </div><!-- /.box-header -->
  <div class="box-body">
    <div class='flashmessenger'><?php $flashmessenger->showMessage();?></div>
    <div class="clear"></div>
    <div class='table-responsive'>
        <table id="tblScheduleEmployee" class="table table-bordered table-striped table-hover table-condensed datatable_whit_filter_column">
            <thead>
            <th class="col-lg-1 text-center"><?php echo $_translator->_getTranslation('Sucursal');?></th>
            <th class="col-lg-1 text-center"><?php echo $_translator->_getTranslation('Periodo #');?></th>
            <th class="col-lg-1 text-center"><?php echo $_translator->_getTranslation('Periodo inicio');?></th>       
            <th class="col-lg-2 text-center"><?php echo $_translator->_getTranslation('Periodo fin');?></th>             
            <th class="col-lg-3 text-center"><?php echo $_translator->_getTranslation('Horas programadas');?></th>
            <th class="col-lg-1 text-center"><?php echo $_translator->_getTranslation('Status');?></th>
            <th class="col-lg-1 text-center">Accion</th>
            </thead>
            <tfoot>
            <th class="filter text-center"><?php echo $_translator->_getTranslation('Sucursal');?></th>
            <th class="filter text-center"><?php echo $_translator->_getTranslation('Periodo #');?></th>
            <th class="filter text-center"><?php echo $_translator->_getTranslation('Periodo inicio');?></th>       
            <th class="filter text-center"><?php echo $_translator->_getTranslation('Periodo fin');?></th>             
            <th class="filter text-center"><?php echo $_translator->_getTranslation('Horas programadas');?></th>
            <th class="filter text-center"><?php echo $_translator->_getTranslation('Status');?></th>
            <th class="filter text-center">Accion</th>
            </tfoot>
            <tbody>
            <?php 
                if($_listScheduleEmployee){
                    foreach($_listScheduleEmployee as $schedule){?>
                        <tr>
                            <td class="text-center"><?php echo $schedule['store_name']?></td>
                            <td class="text-center"><?php echo $schedule['id']?></td>                                    
                            <td class="text-center"><?php echo $schedule['formated_start_period']?></td>    
                            <td class="text-center"><?php echo $schedule['formated_end_period']?></td>
                            <td class="text-center"><?php echo $schedule['scheduled_hours']?></td>
                            <td class="text-center"><?php echo $schedule['status_name']?></td>
                            <td class="text-center">
                                <a class="btn btn-sm btn-default" href="ScheduleEmployee.php?action=edit&id=<?php echo $schedule['id']?>"><i class="fa fa-pencil"></i></a>                                
                                <a class="btn btn-sm btn-danger" onclick="return confirmDelete('<?php echo $_translator->_getTranslation('Esta seguro de cancelar este registro ?')?>',this)" href="ScheduleEmployee.php?action=delete&id=<?php echo $schedule['id']?>"><i class="fa fa-trash"></i></a>
                            </td>
                        </tr><?php
                    }                   
                }?>
            </tbody>
        </table>
    </div>
  </div><!-- /.box-body -->
</div><!-- /.box -->
</section>
<script type="text/javascript" language="javascript">
    $('#tblScheduleEmployee').DataTable({   
            paginate:false,
            filter:true,
            aaSorting:[],
            dom: 'Bfrtip',
            buttons: [
            'excel'
            ]
        });
</script>