<div class="row">
  <!-- begin col-8 -->
  <div class="col-sm-6">
      <!-- begin panel -->
      <div class="panel panel-inverse">
          <div class="panel-heading">
			  <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-expand"><i class="fa fa-expand"></i></a>
			  <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-remove"><i class="fa fa-times"></i></a>
          </div>
          <div class="panel panel-body table-responsive">
              <table class="table table-bordered table-hover table-striped table-td-valign-middle">
                  <thead>
                  <tr>
                    <th class="text-center">No.</th>
                    <th class="">Tahun</th>
                    <th class="">Bulan</th>
					<th class="">Nominal(Rp)</th>
					<th class="">Keterangan</th>
					<th></th>
                  </tr>

                  </thead>
                  <tbody>
                      <?php $i = 0; foreach($data as $r){ $i++ ?>
                        <tr>
                          <td><?php echo $i ?></td>
                          <td><?php echo $r['tahun'] ?></td>
                          <td><?php echo $r['bulan'] ?></td>
						  <td><?php echo number_format($r['nominal'], 0, ',', '.'); ?></td>
						  <td><?php echo $r['keterangan'] ?></td>
						  <td class="text-center">
							<!-- <button class="btn btn-primary btn-sm" type="button" onclick="edit(<?php echo $r['id_alat'] ?>);">Edit</button> -->
							<a href="<?php echo site_url('inventaris/pad/index?idEdit='.$r['id']) ?>" class="btn btn-primary btn-xs">Edit</a>
							<a href="<?php echo site_url('inventaris/pad/hapus_pad?id='.$r['id']) ?>" class="btn btn-danger btn-xs">Hapus</a>
						  </td>

                        </tr>
                      <?php } ?>
                  </tbody>
              </table>
          </div>
      </div>
      <!-- end panel -->
  </div>
  <div class="col-sm-6">
      <!-- begin panel -->
      <div class="panel panel-inverse">
          <div class="panel-heading">
			  <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-expand"><i class="fa fa-expand"></i></a>
			  <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-grey" data-click="panel-remove"><i class="fa fa-times"></i></a>
          </div>
          <div class="panel-body">
			<form class="form-horizontal" method="post" action="<?php echo site_url('inventaris/pad/create_edit'); ?>">
				<div class="form-group m-b-12">
					<input type="hidden" name="id" value="<?php echo !empty($this->input->get('idEdit')) ? $edit['id'] : '' ?>">
                    <label class="col-md-4 col-form-label control-label">Tahun<span class="text-danger">*</span></label>
                    <div class="col-md-8">
                        <input class="form-control" name="tahun" id="tahun" type="number" placeholder="Masukkan Tahun" value="<?php echo !empty($this->input->get('idEdit')) ? $edit['tahun'] : '' ?>" required>
                    </div>
                </div>
				<div class="form-group m-b-12">
                    <label class="col-md-4 col-form-label control-label">Bulan<span class="text-danger">*</span></label>
                    <div class="col-md-8">
                        <input class="form-control" name="bulan" id="bulan" type="number" placeholder="Masukkan Bulan" value="<?php echo !empty($this->input->get('idEdit')) ? $edit['bulan'] : '' ?>" required>
                    </div>
                </div>
				<div class="form-group m-b-12">
                    <label class="col-md-4 col-form-label control-label">Nominal<span class="text-danger">*</span></label>
                    <div class="col-md-8">
                        <input class="form-control" name="nominal" id="nominal" type="number" placeholder="Masukkan Nominal" value="<?php echo !empty($this->input->get('idEdit')) ? $edit['nominal'] : '' ?>" required>
                    </div>
                </div>

				<div class="form-group m-b-12">
                    <label class="col-md-4 col-form-label control-label">Keterangan<span class="text-danger">*</span></label>
                    <div class="col-md-8">
                        <input class="form-control" name="keterangan" id="keterangan" type="text" placeholder="Masukkan nama alat" value="<?php echo !empty($this->input->get('idEdit')) ? $edit['keterangan'] : '' ?>" required>
                    </div>
                </div>
				<div class="form-group m-b-12">
					<label class="col-md-4 col-form-label control-label"></label>
                    <div class="col-md-8">
                        <button class="btn btn-primary" type="submit">Simpan</button>
                    </div>
                </div>
			</form>
          </div>
      </div>
      <!-- end panel -->
  </div>
</div>

<script>
	function edit(x){

	}
</script>
