<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?>process-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($process) && count($process) > 0): foreach($process 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_process'];?>' onclick="change_status('st-<?php echo $row['id_process'];?>','<?=isset($row['status']) ?  $status[$row['status']] : '-'?>','<?=$row['id_process']?>','<?=base_url()?>cms/logic/delete_ajax/process/<?=$row['id_process']?>')">
								<?php echo isset($row['status']) ?  $status[$row['status']] : '-'?>
							</a>
						</td>
						<td align='center'>
							<a href="<?=$url?>process-new?_id=<?=$row['id_process']?>" 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/process/<?=$row['id_process']?>?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=process" method="post" data-parsley-validate enctype="multipart/form-data">  
	<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 class="control-label">Tag Line<span class="text-danger">*</span></label>
					</div>
					<div class="col-sm-9"> 
						<input type='text' class='form-control' id='process_slogan' name='process_slogan' value='<?=(isset($data['process_slogan']) ? $data['process_slogan'] : '')?>' required>
					</div>
				</div>
			</div>			
		
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Text Top</label>
					</div>
					<div class="col-sm-10">
						<textarea class='form-control tinymce-editoradv' rows='2' name='process_text1'  ><?=(isset($data['process_text1']) ? $data['process_text1'] : '')?></textarea>
					</div>
				</div>
			</div>  
			<div class="form-group"> 
				<div class="row">
					<div class="col-sm-2">
						<label>Text Bottom</label>
					</div>
					<div class="col-sm-10">
						<textarea class='form-control tinymce-editoradv' rows='2' name='process_text2'  ><?=(isset($data['process_text2']) ? $data['process_text2'] : '')?></textarea>
					</div>
				</div>
			</div>  
 			
		</div> 	
		<div class="panel-footer">
			<button type="submit" onclick=" " class="btn btn-primary">Proses</button> 
		</div>
	</div>
</form> 
