<?php
// echo $this->db->last_query();
$this->load->view('admin/solicitudes/lista_filtro');
?>
					<!-- MODAL WINDOW -->
					<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-dialog">
							<div class="modal-content">
								<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
								<h4 class="modal-title" id="myModalLabel"><?=$this->lang->line('eap_grl_borrar_header')?></h4>
								</div>
								<div class="modal-body">
								<p class="debug-url"></p>
								<p><?=$this->lang->line('eap_grl_borrar_body')?></p>
								</div>
								<div class="modal-footer">
									<button type="button" class="btn btn-default" data-dismiss="modal"><?=$this->lang->line('eap_grl_cancelar')?></button>
									<a class="btn btn-danger btn-ok"><?=$this->lang->line('eap_grl_borrar')?></a>
								</div>
							</div>
						</div>
					</div>
					<!-- CONTENIDO -->
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="panel panel-primary">
                                <div class="panel-heading">
									<i class="fa fa-list"></i>
									<?=$this->lang->line('eap_pag_'.$this->uri->segment(1).'_'.$this->uri->segment(2));?>
									<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_grl_fecha_creacion')?></th>
																										<th><?=$this->lang->line('eap_solicitudes_nombre')?></th>
																										<th><?=$this->lang->line('eap_solicitudes_grupo')?></th>
																										<th><?=$this->lang->line('eap_solicitudes_empresa')?></th>
																										<th><?=$this->lang->line('eap_solicitudes_estado')?></th>
                                                    <th><?=$this->lang->line('eap_grl_fecha_modificacion')?></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            <?php foreach($solicitudes as $solicitud) : ?>
                                                <tr>
                                                    <td ><?php echo $solicitud['fecha_creacion'] ?></td>
																										<td><?php echo $solicitud['nombre']?></td>
                                                    <td><?php echo $solicitud['grupo_nombre'] ?></td>
                                                    <td><?php echo $solicitud['nombre_empresa'] ?></td>
																										<td><?php echo $solicitud['estado_nombre'] ?><small><?=($solicitud['estado'] == 'C'?" (".$solicitud['caso_estado'].")":"")?></small></td>
                                                    <td><?php echo $solicitud['fecha_modificacion'] ?></td>
                                                    <td class="col-md-1">
                                                    <a href='<?=$this->config->item('base_url')?>index.php/solicitudes/ver/<?=$solicitud['id']?>' title="<?=$solicitud['consulta']?>" class="btn btn-info btn-circle" data-toggle="tooltip" data-placement="left"><i class="fa fa-file-o"></i></a>
													<?if ($solicitud['estado'] == 'C') {?>
													<a href="<?=$this->config->item('base_url')?>index.php/casos/editar/<?=$solicitud['id_casos_eap']?>/1/<?=$solicitud['caso_estado']?>" title="Ver Caso" class="btn btn-success btn-circle" data-toggle="tooltip" data-placement="left"><i class="fa fa-edit"></i></a>
													<?}?>
												</td>
                                                </tr>
                                            <? endforeach;?>
                                                </tbody>
                                        </table>
                                    </div>
                                    <!-- /.table-responsive -->
                                </div>
                                <!-- /.panel-body -->
                            </div>
                            <!-- /.panel -->
                        </div>
                        <!-- /.col-lg-9 -->
                    </div>
	                <!-- /.CONTENIDO -->
<script>
	$('#confirm-delete').on('show.bs.modal', function(e) {
		$(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));

		$('.debug-url').html($(e.relatedTarget).data('desc'));
	});

$(function () {
  $('[data-toggle="tooltip"]').tooltip()
})
</script>
