<?php 
// echo $this->db->last_query();
?>


                            <div class="panel panel-primary">
                                <div class="panel-heading">
									<i class="fa fa-list"></i>
									<?=$this->lang->line('eap_pag_sedes_lista');?>
									<div class="pull-right">
									<a href='<?=$this->config->item('base_url')?>index.php/sedes/nuevo/<?=$empresa['id_empresas']?>/' title="<?=$this->lang->line('eap_sedes_nuevo')?>" class="btn btn-info btn-circle"><i class="fa fa-plus"></i></a>
									</div>
									<div class="clearfix"></div>
                                </div>
                                <!-- /.panel-heading -->
                                <div class="panel-body">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-hover">
                                            <thead>
                                                <tr>
                                                    <th><?=$this->lang->line('eap_sedes_nombre')?></th>
                                                    <th><?=$this->lang->line('eap_grl_estado')?></th>
                                                    <th><?=$this->lang->line('eap_grl_fecha_modificacion')?></th>
													<th><?=$this->lang->line('eap_grl_acciones')?></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            <?php if (!empty($sedes)) {
											foreach($sedes as $sede) : ?>                                    
                                                <tr>
                                                    <td><?php echo $sede['nombre'] ?></td>
                                                    <td <?php if (!$sede['activo']) { echo "class='text-danger'";} ?>><?php echo ($sede['activo'])?$this->lang->line('eap_grl_estado_activo'):$this->lang->line('eap_grl_estado_inactivo'); ?></td>
                                                    <td><?php echo $sede['fecha_modificacion'] ?></td>													<td>
                                                    <a href='<?=$this->config->item('base_url')?>index.php/sedes/ver/<?=$sede['id_sedes']?>' title="<?=$this->lang->line('eap_sedes_ver')?>" class="btn btn-info btn-circle"><i class="fa fa-file-o"></i></a>
                                                    <a href='<?=$this->config->item('base_url')?>index.php/sedes/editar/<?=$sede['id_sedes']?>/lista' title="<?=$this->lang->line('eap_sedes_editar')?>" class="btn btn-info btn-circle"><i class="fa fa-edit"></i></a>&nbsp;
                                                    <?php if (!$sede['activo']) { ?>
                                                    <a href='<?=$this->config->item('base_url')?>index.php/sedes/cambiar_estado/<?=$sede['id_sedes']?>/activar/<?=$sede['empresa']?>' title="<?=$this->lang->line('eap_sedes_activar')?>" class="btn btn-info btn-circle"><i class="fa fa-check"></i></a>&nbsp;
                                                    <?php } else {?>
                                                        <a href='<?=$this->config->item('base_url')?>index.php/sedes/cambiar_estado/<?=$sede['id_sedes']?>/desactivar/<?=$sede['empresa']?>' title="<?=$this->lang->line('eap_sedes_desactivar')?>" class="btn btn-info btn-circle"><i class="fa fa-times"></i></a>&nbsp;
                                                    <?php }?>
													</td>
                                                </tr>
                                            <? 
											endforeach;
											}
											?>
                                                </tbody>
                                        </table>
                                    </div>
                                    <!-- /.table-responsive -->
                                </div>
                                <!-- /.panel-body -->
                            </div>
                            <!-- /.panel -->
