<?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>Bidang</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="#">Home</a></li>
          <li class="breadcrumb-item active">bidang</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">Bidang<span></span></h5>
				  <a href="<?php echo base_url().'admin/bidang/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:30%">Bidang</th>
                        <th style="width:20%;text-align:center" >Aksi</th> 
                      </tr>
                    </thead>
                    <tbody>
					<?php 	  
					$no=0; foreach($bidang->result() as $row){ $no++;					
					?>		
										  			
                      <tr>

                        <th ><input type="hidden" name="id" value="<?php echo $row->idbidang;?>"><?php echo $no;?></th>
                        <td><?php echo $row->namabidang;?></td>
                        <td style="text-align:center"><a href="<?php echo base_url().'admin/bidang/edit/'.$row->idbidang;?>"><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/bidang/hapus/'.$row->idbidang;?>"><button type="button" class="btn btn-danger" title="Hapus" name="hapus" onclick="return confirm('Yakin Akan Hapus data <?php echo $row->namabidang;?>')"><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'); ?> 