
<div class="row" id="portlet-content">
    <div class="col-md-12">
        <div class="portlet light" style="position:relative">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-laptop"></i>Paket Laboratorium BBMC
                </div>

                <div class="actions"  style="margin-right:5px !important" >
                    <a class="btn " href="<?php echo site_url()?>/setting/insert_entry/bbmc_re_laboratorium_template/insert">
                        <i class="fa fa-plus"></i> Paket
                    </a> 
                </div>
               

            
            </div>
            <div class="portlet-body" id="page-content" style="display:nonee">
                <div class="table-responsive">
                    <table id="<?=$controller?>_table" class="table table-bordered table-striped table-hover" style="width:100%">
                        <thead>
                            <tr>
                                <th class="text-left"><i class="fa fa-th-large"></i></th>
                                <th class="text-left">Tindakan Lab</th>   
                                <th class="text-left">Template Set</th>   
                            </tr>
                        </thead>
                        <tbody>
                            <?php 
                            $this->db->select('*');
                            $this->db->from('bbmc_re_laboratorium_template');
                            $this->db->where('deleted','0');
                            $q = $this->db->get();
                            foreach ($q->result() as $key ) { ?>
                            <tr>
                                <td style="width: 100px">
                                  <a data-toggle="tooltip" class="btn-xs btn-info" data-placement="top" title="Edit Template Lab" href="<?=site_url()?>/setting/insert_entry/bbmc_re_laboratorium_template/update/<?=$key->id_re_laboratorium_template?>"><i class="fa fa-edit"></i></a>
                                  <a data-toggle="tooltip" class="btn-xs btn-danger" data-placement="top" title="Hapus Template Lab" href="<?=site_url()?>/front_office/ugd_dir/ugd/del_laboratorium_template/<?=$key->tindakan_lab?>" onclick="return confirm('Apakah anda yakin menghapus entry ini?')"><i class="fa fa-times"></i></a>
                                  
                                </td>
                                <td> 
                                  <?=$this->Content_m->get_value('siak_re_account_chart','id',$key->tindakan_lab,'name')?>
                                
                                </td>
                                <td> 
                                  <?=$key->template_set?>
                                </td>
                            </tr>
                            <?php }?>
                         

                        </tbody>
                    </table>
                </div>

               
            </div>
           
        </div>
    </div>
</div>





<script>
  $(document).ready( function () {
    var table=$('#<?=$controller?>_table').DataTable({
      "order": [[ 1, 'asc' ]],
      "processing": false,
      "serverSide": false,
      "searching": true,
      "language": {
            "url": "<?=base_url('media/assets/global/plugins/datatables/media/js')?>/indonesian.json"
       },
      "columnDefs": [
        
        //{"className": "text-center", "targets": [-1]},
        {"targets": [0],"bSortable": false}
      ],
    
      "fnInitComplete": function(oSettings, json) {
        $('.dataTables_processing').css('display','none');
        $( "#loading-content" ).fadeOut( "fast", function() {
          $( "#tombol-action" ).fadeIn("fast");
          $( "#page-content" ).fadeIn("fast");
        });
      }
    });

  });

  $('.hapusdata').click(function(){
    if(confirm("Apakah kamu yakin menghapus entry ini?")){
      return true;
    }
    else{
      return false;
    }
  });
</script>
