<? global $vis_language; 
if($release_type_details==-1){   
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_release_type_form .panel-footer").hide(); $("#vis_release_type_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
<script> $("#view_action").show(); $("#vis_release_type_form .panel-footer").show(); $("#vis_release_type_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 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($release_type_details!=-1) for($i=0;$i<$release_type_info['release_type_count'];$i++) { if($release_type_details[$i]['release_type_id']==1) $disable='disabled=disabled'; else $disable='';
             if($release_type_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
             $department_access=$release_type_details[$i]['department'];
             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="'.$release_type_details[$i]['release_type_id'].'" '.$disable.'/><i></i></label></td>';
             echo '<td><a href="#/setting/release_type_details/'.rawurlencode(str_replace('/', ' ', $release_type_details[$i]['name'])).'/'.$release_type_details[$i]['release_type_id'].'" style="color:'.$release_type_details[$i]['color'].'">'.$release_type_details[$i]['name'].'</a></td>';
			 echo '<td><a href="#/setting/release_type_details/'.rawurlencode(str_replace('/', ' ', $release_type_details[$i]['name'])).'/'.$release_type_details[$i]['release_type_id'].'">'.$release_type_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_release_type/'.$release_type_details[$i]['release_type_id'].'">'.$vis_language['TXTCLONE'].'</a></td>';
	  if($release_type_details[$i]['release_type_id']>1){?>
      <td align="center"> <a class="text-muted" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_release_type_delete&vis_release_type_id=<? echo $release_type_details[$i]['release_type_id']; ?>&vis_static_area=vis_release_type_delete_form" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></a></td>
      <? }else echo '<td></td>';?>
      </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,
            { "bSortable": false },
   			{ "bSortable": false }
   		]
   	});
   });
</script>
