<div class="row produk-desktop-grid">
	<?php if(!empty($result)){
		$no = 1;
		
		foreach ($result as $row){
			 
			if ($row['pub'] == 1){ 
				$aktif ='<i class="fa fa-check-circle"></i>';
				$text ='text-white'; 
				}else{ 
				$aktif = '<i class="fa fa-check-circle-o"></i>';
				$text ='text-white-50'; 
			}
			
			$hapus = '<button type="button" class="btn btn-danger text-white" data-id="'.$row['id'].'" data-toggle="modal" data-target="#confirm-delete" href="#"><i class="fa fa-trash "></i> Hapus</button>';
		?>
		<div class="col-md-3 mb-2">
			<div class="card">
			 
				<center><svg id="itf-1<?=$no;?>" class="w-95"></svg></center>
				<script>JsBarcode("#itf-1<?=$no;?>", "<?=$row['barcode'];?>", {format: "EAN13"});</script>
				<div class="card-body-p">
					<h2 class="name"><?=$row['title'];?></h2>
					<h4 class="job-title"><?=$row['jenis_cetakan'];?></h4>
				</div>
				
				<div class="card-footer-p">
					<div class='btn-group btn-group-sm' role='group'>
						<button type='button' class='btn btn-info btn-sm' data-id="<?=$row["id"];?>"><span class='icon <?=$text;?>'><?=$aktif;?></span></button>
						<button type='button' class='btn btn-info btn-sm' data-toggle='modal' data-target='#OpenModal' data-id="<?=$row["id"];?>" data-mod='edit'><i class='fa fa-edit'></i> Edit</button><?=$hapus;?>
					</div>
				</div>
			</div>
			
		</div>										
		<?php
			$no++;
		}
		
	}else{ ?>
	
	<?php } ?>
	
</div><!-- /.card-body -->
<div class="produk-mobile-list">
	<?php if(!empty($result)){
		$no_mobile = 1;
		foreach ($result as $row){
			$hapus = '<button type="button" class="btn btn-danger btn-sm text-white" data-id="'.$row['id'].'" data-toggle="modal" data-target="#confirm-delete"><i class="fa fa-trash"></i> Hapus</button>';
	?>
	<div class="produk-mobile-card">
		<div class="produk-mobile-barcode">
			<svg id="produk-mobile-ajax-<?=$no_mobile;?>" class="produk-mobile-barcode-svg"></svg>
		</div>
		<script>JsBarcode("#produk-mobile-ajax-<?=$no_mobile;?>", "<?=$row['barcode'];?>", {format: "EAN13", height: 46, fontSize: 14, margin: 0});</script>
		<div class="produk-mobile-info">
			<div class="produk-mobile-title"><?=$row['title'];?></div>
			<div class="produk-mobile-category"><?=$row['jenis_cetakan'];?></div>
		</div>
		<div class="produk-mobile-actions">
			<button type="button" class="btn btn-info btn-sm text-white" data-toggle="modal" data-target="#OpenModal" data-id="<?=$row["id"];?>" data-mod="edit">
				<i class="fa fa-edit"></i> Edit
			</button>
			<?=$hapus;?>
			<button type="button" class="produk-mobile-menu" aria-label="Menu produk">
				<i class="fa fa-ellipsis-v"></i>
			</button>
		</div>
	</div>
	<?php $no_mobile++; } } ?>
</div>
<nav aria-label="Page navigation" class="mt-2">
	<?php 
		echo $this->ajax_pagination->create_links(); 
	?>
</nav>
