<? global $vis_language;
if($labels==-1 || $labels==''){   
	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['TXTLABELNAME']; ?></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($labels!=-1) for($i=0;$i<count($labels);$i++) { if($labels[$i]['label_id']==1) $disble='disabled=disabled'; else $disble='';
                         if($labels[$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_'.$i.'" id="vis_global_mass_chk_'.$i.'" value="'.$labels[$i]['label_id'].'" '.$disble.'/><i></i></label></td><td><a href="#/setting/label_details/'.rawurlencode(str_replace('/', ' ', $labels[$i]['label_name'])).'/'.$labels[$i]['label_id'].'" style="background-color: '.$labels[$i]['label_color'].'; color: #fff;" class="padder">'.$labels[$i]['label_name'].'</a></td>';
                         echo '<td><a href="#/setting/label_details/'.rawurlencode(str_replace('/', ' ', $labels[$i]['label_name'])).'/'.$labels[$i]['label_id'].'">'.$labels[$i]['display_order'].'</a></td>';
                         echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>';
                         echo '<td align="right"><a class="link" href="#/setting/clone_label/'.$labels[$i]['label_id'].'">'.$vis_language['TXTCLONE'].'</a></td>'; ?>
                  <td align="center"> <? if($labels[$i]['label_id']!=1) { ?> <a class="text-muted" data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=confirm_delete_label&count=<? echo count($labels);?>&vis_tag_id=<? echo $labels[$i]['label_id']; ?>&vis_static_area=vis_tag_delete_form&vis_page=<? echo $label_info['page']; ?>&vis_current_operation=<? echo $operation['vis_current_operation']; ?>&vis_current_module=<? echo $operation['vis_current_module']; ?>" title="<? echo $vis_language['TXTDELETE']; ?>" href="javascript:void(0);" ><i class="vh vh-delete-round"></i></a><? } ?></td>
                  <?
                     } ?>
               </tbody>
 </table> <? } ?>
<script type="text/javascript">
   $(".selectpicker").selectpicker();
   $(document).ready(function() {
   $('[data-ride="datatables"]').dataTable({
   	 "bPaginate" : false,
          "paginate": false,
   		"sDom": 't', "bAutoWidth": false,
   		"aoColumns": [
   			{ "bSortable": false },
   		  	null,
   		  	null,
   		  	null,
            { "bSortable": false },
   			{ "bSortable": false }
   		]
   	});
   });
</script>



