<h2 class="page-header">
	<?php echo $judul;?>
</h2>
<div class="panel panel-default">
	<div class="panel-heading">
		<div class="row">
			<div class='col-sm-6'>List</div>
			<div class='col-sm-6' align='right'>
				<a href="<?=$url?>how-new" class="btn btn-success btn-sm"><i class=" fa fa-plus"></i> Tambah</a>
			</div>
		</div>
	</div>
	<div class="panel-body">
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover dataTables" >
				<thead>
					<tr>
						<th width='35'>No</th>
						<th width='100'>Icon</th>
						<th width=''>Header</th>
						<th width=''>Text</th>
						<th width='70'>Status</th>
						<th width='70'></th>
					</tr>
				</thead>
				<tbody>
					<?php
						$no=1;
						if(isset($how) && count($how) > 0): foreach($how as $row):  
					?>
					<tr>
						<td align='center'><?=$no;?></td>
						<td align='center'><i class='fa <?=$row['icon'];?>'></i> <?=$row['icon'];?></td>
						<td align=''><?=$row['header'];?></td>
						<td align=''><?=$row['text'];?></td>
						<td align='center'>
							<a href='javascript:void(0);' class="label label-success" id='st-<?php echo $row['id_how'];?>' onclick="change_status('st-<?php echo $row['id_how'];?>','<?=isset($row['status']) ?  $status[$row['status']] : '-'?>','<?=$row['id_how']?>','<?=base_url()?>cms/logic/delete_ajax/how/<?=$row['id_how']?>')">
								<?php echo isset($row['status']) ?  $status[$row['status']] : '-'?>
							</a>
						</td>
						<td align='center'>
							<a href="<?=$url?>how-new?_id=<?=$row['id_how']?>" class='btn btn-xs btn-success '><i class="fa fa-edit "></i></a>
							<a class='btn btn-xs btn-danger' onclick="return confirm('Are you sure you want to delete this item?');" href="<?=base_url()?>cms/logic/delete/how/<?=$row['id_how']?>?part=home" class="text-danger"><i class="fa fa-trash-o"></i></a>					
						</td>
					</tr>
					<?php $no++; endforeach; endif; ?>
				</tbody>
			</table>
		</div>
	</div>
</div>
<form action="<?=base_url()?>cms/logic/homeProses?p=how" method="post" data-parsley-validate enctype="multipart/form-data"> 
		<input type="hidden" name="image_1" value="<?=$data['banner_video']?>" />
		<input type="hidden" name="image_2" value="<?=$data['banner_image']?>" />
	<div class="panel panel-default">
		<div class="panel-heading">
			<div class="row">
				<div class='col-sm-6'>Text</div>
				<div class='col-sm-6' align='right'></div>
			</div>
		</div>
		<div class="panel-body">  			
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Text</label>
					</div>
					<div class="col-sm-10">
						<textarea class='form-control tinymce-editoradv' rows='2' name='about_how'  ><?=(isset($data['about_how']) ? $data['about_how'] : '')?></textarea>
					</div>
				</div>
			</div>  
 			
		</div> 	
		<div class="panel-footer">
			<button type="submit" onclick=" " class="btn btn-primary">Proses</button> 
		</div>
	</div>
</form> 
