<? global $vis_language;
if($service_details==-1){   
	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['TXTNAME']; ?></th>
         <th><? echo $vis_language['TXTSERVICECATEGORY']; ?></th>
         <!--<th><? //echo $vis_language['TXTCIPRODUCT']; ?></th>-->
         <th><? echo $vis_language['TXTCOST']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
         <th></th>
      </tr>
   </thead>
   <tbody>
      <?
         for($i=0;$i<count($service_details);$i++) {
			 if($service_details[$i]['status']==1){ $status = $vis_language['TXTPUBLISHED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDRAFT'];$lbl='label-default';}
             if($service_details[$i]['finance_id'] == 1){echo '<tr><td width="30"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_'.$i.'" id="vis_global_mass_chk_'.$i.'" value="'.$service_details[$i]['finance_id'].'" disabled="disabled"/><i></i></label></td>';}else{echo '<tr><td width="30"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_'.$i.'" id="vis_global_mass_chk_'.$i.'" value="'.$service_details[$i]['item_id'].'" /><i></i></label></td>';} 
             echo '<td><a href="#/setting/edit_service_item/'.rawurlencode(str_replace('/', ' ', $service_details[$i]['name'])).'/'.$service_details[$i]['item_id'].'">'.ucfirst($service_details[$i]['name']).'</a></td>';
			 echo '<td><a href="#/setting/edit_service_item/'.rawurlencode(str_replace('/', ' ', $service_details[$i]['name'])).'/'.$service_details[$i]['item_id'].'">'.ucfirst($service_details[$i]['category_name']).'</a></td>';
			  echo '<td><a href="#/setting/edit_service_item/'.rawurlencode(str_replace('/', ' ', $service_details[$i]['name'])).'/'.$service_details[$i]['item_id'].'">'.ucfirst($service_details[$i]['cost']).'</a></td>';
            // echo '<td><a href="#/setting/edit_service_item/'.str_replace('/', ' ', $service_details[$i]['name']).'/'.$service_details[$i]['item_id'].'">'.$service_details[$i]['description'].'</a></td>';
			 echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>'; ?>
      <td align="center"><a class="text-muted"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_service_item_delete&vis_item_id=<? echo $service_details[$i]['item_id']; ?>&vis_static_area=vis_service_delete_form" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></a><? //} ?></td>
      </tr> <?
         } ?>
   </tbody>
</table><? } ?>
<script> $(".selectpicker").selectpicker();</script>
<script type="text/javascript">
   $(document).ready(function() {	
   $('[data-ride="datatables"]').dataTable({		
           "bPaginate" : false,	
   		"sDom": 't', "bAutoWidth": false,
   		"aoColumns": [
   			{ "bSortable": false },
   		  	null,
			null,
		  	null,
			null,									
   			{ "bSortable": false }
   		]
   	});
   });
</script>