<?php $this->load->view('admin/layout/meta'); ?>
<?php $this->load->view('admin/layout/header'); ?>
<?php $this->load->view('admin/layout/aside'); ?>
  <main id="main" class="main">
    <div class="pagetitle">
      <h1>Asal Instansi</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="#">Home</a></li>
          <li class="breadcrumb-item active">Asal Instansi</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->
    <section class="section dashboard">
      <div class="row">
        <!-- Left side columns -->
        <div class="col-lg-12">
          <div class="row">
          <div class="card">
            <div class="card-body">
                  <h5 class="card-title">Asal Instansi<span></span></h5>
				  <a href="<?php echo base_url().'admin/asalinstansi/add';?>"><button type="button" class="btn btn-primary"><i class="bi bi-plus me-1"></i> Tambah</button></a>
				  <br /><br />
                  <table class="table table-borderless" id="data-table" class="display" style="width:100%">
                    <thead>
                      <tr>
                        <th style="width:5%">No</th>
                        <th style="width:10%">Kode</th>
                        <th style="width:30%">Asalinstansi</th>
                        <th style="width:20%;text-align:center" >Aksi</th> 
                      </tr>
                    </thead>
                    <tbody>
					<?php 	  
					$no=0; foreach($asalinstansi->result() as $row){ $no++;					
					?>		
										  			
                      <tr>

                        <th ><input type="hidden" name="id" value="<?php echo $row->idasalinstansi;?>"><?php echo $no;?></th>
                        <td><?php echo $row->kode;?></td>
                        <td><?php echo $row->namaasalinstansi;?></td>
                        <td style="text-align:center"><a href="<?php echo base_url().'admin/asalinstansi/edit/'.$row->idasalinstansi;?>"><button type="button" class="btn btn-success" title="Edit" name="edit"><i class="bi bi-pencil"></i></button></a>
							    <a href="<?php echo base_url().'admin/asalinstansi/hapus/'.$row->idasalinstansi;?>"><button type="button" class="btn btn-danger" title="Hapus" name="hapus" onclick="return confirm('Yakin Akan Hapus data <?php echo $row->namaasalinstansi;?>')"><i class="bi bi-trash"></i></button></a>								
						</td>
						
                      </tr>	
					<?php }?>
                    </tbody>
                  </table>

                </div>
				</div>
              </div>
            </div><!-- End Recent Sales -->

          </div>
        </div><!-- End Left side columns -->
      </div>
    </section>
  </main><!-- End #main -->
<?php $this->load->view('admin/layout/foot-table'); ?>  
<?php $this->load->view('admin/layout/foot'); ?> 