<? global $vis_language;
if($status_details==-1 || $status_details==''){   
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_'.$operation['vis_operation'].'_form .panel-footer").hide(); $("#vis_domain_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
<script> $("#view_action").show(); $("#vis_<?php echo $operation['vis_operation']; ?>_form .panel-footer").show(); $("#vis_domain_list").show(); </script>
<table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
	<thead class="table_head">
		<tr>
			<th>
				<div class="btn-group">
					<label class="checkbox m-n m-r-sm i-checks"  style="float: left;"><input type="checkbox"><i></i></label>		
				</div>
			</th>
			<th><? echo $vis_language['TXTTITLE']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTACCESS']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTDISPLAYORDER']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>					
			<th></th>
            <th></th>
		</tr>
	</thead>
	<tbody>			  
		<?
   if($status_details!=-1) for($i=0;$i<count($status_details);$i++) {
	    $access=($status_details[$i]['access_type']==1)?$vis_language['TXTPRIVATE']:$vis_language['TXTPUBLIC'];
        if($status_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
	    echo '<tr>';?><td width="30"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_<? echo $i; ?>" id="vis_global_mass_chk_<? echo $i; ?>" value="<? echo $status_details[$i]['status_id']; ?>" <? if($status_details[$i]['status_id']==1 || $status_details[$i]['status_id']==3) { ?> disabled="disabled" <? } ?> /><i></i></label></td>
        <? echo '<td><a style="color:'.$status_details[$i]['color'].';" href="#/setting/status_details/'.rawurlencode(str_replace('/', ' ', $status_details[$i]['status_name'])).'/'.$status_details[$i]['status_id'].'">'.$status_details[$i]['status_name'].'</a></td>';
         echo '<td><a href="#/setting/status_details/'.rawurlencode(str_replace('/', ' ', $status_details[$i]['status_name'])).'/'.$status_details[$i]['status_id'].'">'.$access.'</a></td>';
        echo '<td><a href="#/setting/status_details/'.rawurlencode(str_replace('/', ' ', $status_details[$i]['status_name'])).'/'.$status_details[$i]['status_id'].'">'.$status_details[$i]['display_order'].'</a></td>';
        echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>'; 
        echo '<td align="right"><a class="link" href="#/setting/clone_status/'.$status_details[$i]['status_id'].'">'.$vis_language['TXTCLONE'].'</a></td>'; ?> 
		 <td align="center"><? if(!in_array($status_details[$i]['status_id'],array(1,3))){ ?> <a class="text-muted" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_status_delete&vis_status_id=<? echo $status_details[$i]['status_id']; ?>&vis_static_area=vis_domain_delete_form&count=<? echo count($status_details);?>&vis_page=<? echo $ticket_info['page']; ?>" title="<? echo $vis_language['TXTDELETE']; ?>" href="javascript:void(0);" ><i class="vh vh-delete-round"></a><? } ?></td>		
       <? echo '</tr>';
    } ?>
	</tbody>
</table><? } ?>
<script type="text/javascript">
$(".selectpicker").selectpicker();
$(document).ready(function() {	
$('[data-ride="datatables"]').dataTable({		
         "bPaginate" : false,	
		"sDom": 't', "bAutoWidth": false,
		"aoColumns": [
			{ "bSortable": false },
		  	null,
		  	null,
		  	null,
		  	null,
            { "bSortable": false },
			{ "bSortable": false }
		]
	});
});
</script>


