<?php 
// echo $this->db->last_query();
?>
					<!-- 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="pull-right">
									<a href='<?=$this->config->item('base_url')?>index.php/tipos/nuevo/' title="<?=$this->lang->line('eap_tipos_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_tipos_nombre')?></th>
													<th><?=$this->lang->line('eap_tipos_graficos_nombre')?></th>
                                                    <th><?=$this->lang->line('eap_grl_fecha_modificacion')?></th>
													<th><?=$this->lang->line('eap_grl_acciones')?></th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            <?php foreach($tipos as $tipo) : ?>                                    
                                                <tr>
                                                    <td><?php echo $tipo['nombre'] ?></td>
													<td><?php echo ($this->config->item('language_code') == 'PT') ? $tipo['graficos_nombre_pt'] : $tipo['graficos_nombre'] ?></td>
                                                    <td><?php echo $tipo['fecha'] ?></td>
                                                    <td>
                                                    <a href='<?=$this->config->item('base_url')?>index.php/tipos/ver/<?=$tipo['id_tipos']?>' title="<?=$this->lang->line('eap_tipos_ver')?>" class="btn btn-info btn-circle"><i class="fa fa-file-o"></i></a>
                                                    <a href='<?=$this->config->item('base_url')?>index.php/tipos/editar/<?=$tipo['id_tipos']?>/lista' title="<?=$this->lang->line('eap_tipos_editar')?>" class="btn btn-info btn-circle"><i class="fa fa-edit"></i></a>&nbsp;
													<a  href="#" data-href='<?=$this->config->item('base_url')?>index.php/tipos/borrar/<?=$tipo['id_tipos']?>/lista' title="<?=$this->lang->line('eap_tipos_borrar')?>" data-toggle="modal" data-target="#confirm-delete" data-desc='<?=$this->lang->line('eap_tipos_borrar')."=>".$tipo['nombre']?>' class="btn btn-danger btn-circle"><i class="fa fa-trash-o"></i></a>&nbsp;														
                                                    </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'));
	});
</script>	
                        
