
<table class="table table-striped table-mailcard">
	<thead>
		<tr>
			<th class='w-1 text-center'>No</th>
			<th>Item</th>
			<th>No. Akun</th>
			<th class='w-20 text-right'>Status | Aksi</th>
		</tr>
	</thead>
	<tbody>
		<?php if(!empty($result)){
			$no=$this->uri->segment(3)+1;
			foreach ($result as $row){
				$item_id = encrypt_url($row['id']);
				
				if ($row['pub'] == 'Y'){ $aktif ='<i class="fa fa-check-circle text-white" title="Aktif"></i>'; }else{ $aktif = '<i class="fa fa-minus-circle text-danger" title="Nonaktif"></i>'; }
				
				$edit_jenis = "<a class='btn-sm edit_item text-info' title='Edit Data' data-id='$item_id' href='#'>$row[title]</a>";
				$edit_btn = "<a class='btn btn-info btn-sm edit_item text-white' title='Edit Data' data-id='$item_id' href='#'><i class='fa fa-edit'></i> Edit</a>";
				$hapus = '<a class="btn btn-danger btn-sm text-white" data-id="'.$item_id.'" data-toggle="modal" data-target="#confirm-delete" href="#"><i class="fa fa-trash "></i> Hapus</a>';
				
				echo "<tr><td class='text-center'>$no</td>
				<td class='pl-1'>$edit_jenis</td>
				<td>".getIdAkunPendapatan($row['id_akun'])."</td>
				<td class='text-right'><div class='btn-group btn-group-sm' role='group'>
				<button type='button' class='btn btn-info btn-sm ' data-id='".$item_id."'><span class='icon text-white'>$aktif</span></button>$edit_btn $hapus
				</div></td>
				</tr>";
				$no++;
			} }else{ ?>
			<tr>
				<td colspan="5">Data belum ada</td>
			</tr>
		<?php } ?>
	</tbody>
</table>
<nav aria-label="Page navigation" class="mt-2">
	<?php 
		echo $this->ajax_pagination->create_links(); 
	?>
</nav>
</div><!-- /.card-body -->