<!DOCTYPE html>
<html lang="es">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Informes Histopatol&oacute;gicos</title>
    <?php $this->load->view('css'); ?>
    <?php $this->load->view('js'); ?>
    <script>
    
    $(document).ready(function(){
       $('#btn_close').html('<?php echo $username; ?>');
	$.ajax({
            data:  null,
            url:   '<?php echo base_url();?>index.php/inicio/tabla_informe',
            type:  'post',
            async:false,
            success:  function (response) {                
                $('#contenido_tabla').html(response); 
            }
       }); 
       
       $('#btn_nuevo').click(function(){
            $.ajax({
                data:  null,
                url:   '<?php echo base_url();?>index.php/inicio/nuevo_examen',
                type:  'post',
                async:false,
                success:  function (response) {                
                    $('.modal-content').html(response); 
                    $('#ventana_modal').modal('show');
                }
           });            
           
       });
       
       $("#btn_informe").click(function(){
	 $.ajax({
	     //data: {'key1' : 'data1', 'key2' : {'0':'data 0','1':'data 1','2':'data 2'},'key3':'data3'},        
	     url:   '<?php echo base_url();?>index.php/inicio/tabla_informe',
	     type:  'post',
	     async:false,
	     success:  function (response) {                
		 $('#contenido_tabla').html(response); 
	     }
	 }); 
       });
           
       $("#btn_estadistica").click(function(){
	 $.ajax({
	     data:  null,
	     url:   '<?php echo base_url();?>index.php/inicio/tabla_estadistica',
	     type:  'post',
	     async:false,
	     success:  function (response) {                
		 $('#contenido_tabla').html(response); 
	     }
	 }); 
       });
       
       $("#user_close").click(function(){
	 location = "<?php echo base_url();?>index.php/inicio/cerrar_sesion";
       })

    });
    
    </script>
  </head>
  <body>
      <br>
      <div class="row">
          <div class="col-md-9 col-md-offset-1">
            <div class="panel panel-primary">
              <div class="panel-heading">
		 <h3 class="panel-title">Anatom&iacute;a Patologica - Inicio</h3>
              </div>
              <div class="panel-body">
                  <div class="row">
                      <div class="col-md-12">                          
                            <div class="panel panel-default">
                              <div class="panel-heading">
                                <h3 class="panel-title">Menu de Trabajo</h3>
                              </div>
                              <div class="panel-body col-sm-9">
                                <button type="button" id="btn_nuevo" class="btn btn-md btn-primary">Nueva Solicitud</button>
                                <button type="button" id="btn_informe" class="btn btn-md btn-success">Informe</button>
                                <button type="button" id="btn_estadistica" class="btn btn-md btn-info">EstadÃ­sticas</button>
                              </div>
                              <div class="panel-body col-sm-3">
				 <div class="btn-group">				 
				    <button type="button" id="btn_close" class="btn btn-danger">Título del botón</button>
				    <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
				      <span class="caret"></span>
				      <span class="sr-only">Desplegar menú</span>
				    </button>
				    <ul class="dropdown-menu" role="menu">
				       <li id="user_change"><a href="#">Modificar</a></li>
				       <li id="user_close"><a href="#">Cerrar</a></li>
				    </ul>
				 </div>
                              </div>
			       
                            </div>                  
                      </div>                      
                  </div>
                  <div class="row">
                      <div class="col-md-12">
                          <div id="contenido_tabla"></div>
                          <div id="solicitud"></div>
                      </div>                      
                  </div>                                                      
              </div>
            </div>                            
          </div>
      </div>
            


<!-- Modal -->
<div class="modal fade" id="ventana_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <!--<div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
        <button type="button" class="btn btn-primary" id="btn_modal">Guardar</button>
      </div>-->
    </div>
  </div>
</div> 

  </body>
</html>  