<? global $vis_language;?>
            <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>
                      <? if($operation['custom_show_report']==7) { ?>
                     <th class="txt_nowrap"><? echo $vis_language['TXTDURATION'].' '.$vis_language['TXTFROM']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTDURATION'].' '.$vis_language['TXTTO']; ?></th>
                     <? } ?>
                     <!--<th class="txt_nowrap"><? echo $vis_language['XTCREATEDATE']; ?></th>-->
                   
                   <? if($operation['custom_show_report']!=7) { ?>
                   <th class="txt_nowrap"><? echo $vis_language['TXTDISPLAYORDER']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
                     <? }?>
                    
                    <th></th>
                  </tr>
               </thead>
               <tbody>
                  <?
                     if($filters!=-1) for($i=0;$i<count($filters);$i++) {
						if($filters[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
                        
						if(($filters[$i]['owner']==0 && VIS_STAFF_ID==1) || VIS_STAFF_ID==$filters[$i]['owner']){}
						
						echo '<tr id="'.$i.'">';
						if( (VIS_STAFF_ID!=1 && $filters[$i]['filter_id']!=25 && $filters[$i]['filter_id']!=26 && $filters[$i]['filter_id']!=27 && $filters[$i]['filter_id']!=28 && $filters[$i]['filter_id']!=29) || VIS_STAFF_ID==1){
						echo '<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="'.$filters[$i]['filter_id'].'" /><i></i></label></td>';
						}else{
						echo '<td width="30"></td>';	
						}
                        echo '<td><a href="#/ticket/search_detail/'.$filters[$i]['filter_name'].'/'.$filters[$i]['filter_id'].'/'.$operation['custom_show_report'].'">'.$filters[$i]['filter_name'].'</a></td>';
																								if($operation['custom_show_report']==7 ) {
																								echo '<td><a href="#/ticket/search_detail/'.$filters[$i]['filter_name'].'/'.$filters[$i]['filter_id'].'/'.$operation['custom_show_report'].'">'.format_datetime($filters[$i]['fromdate']).'</a></td>';
																								
																								echo '<td><a href="#/ticket/search_detail/'.$filters[$i]['filter_name'].'/'.$filters[$i]['filter_id'].'/'.$operation['custom_show_report'].'">'.format_datetime($filters[$i]['todate']).'</a></td>';
																								}
																									//echo '<td><a href="#/ticket/search_detail/'.$filters[$i]['filter_name'].'/'.$filters[$i]['filter_id'].'/'.$operation['custom_show_report'].'">'.format_datetime($filters[$i]['display_order']).'</a></td>';
																									
																																														
                        
																								if($operation['custom_show_report']!=7) {
																									echo '<td><a href="#/ticket/search_detail/'.$filters[$i]['filter_name'].'/'.$filters[$i]['filter_id'].'/'.$operation['custom_show_report'].'">'.$filters[$i]['display_order'].'</a></td>';
																									echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>';
																								}
																								
																								
						if($operation['custom_show_report']==7 ) { ?>
						
                  <td align="center" >
                  <div id="option_<? echo $i; ?>" style="display:block; width:10;">
                  	<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" style="padding:0px; background:none;"><i class="vh vh-action text-muted"></i> <b class="caret"></b></button>
						  <ul class="dropdown-menu dropdown-menu-right text-left">
        <li><a class="text-primary m-r-sm link" href="javascript:void(0);" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $filters[$i]['filter_name']; ?>',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':<? echo $filters[$i]['filter_id']?>,'vis_search':3,'vis_report':1,'vis_is_report':1});"><? echo $vis_language['TXTGENRATE']; ?></a></li>
        <li><a href="javascript:void(0);" class="m-r-sm link" data-toggle="ajaxModal" data-modal-arguments="vis_module=report&vis_operation=add_report_inqueue&vis_static_area=vis_open_new_dialog&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&report_type=14" type="button"><? echo $vis_language['TXTEXPORT']; ?></a></li>
    <li><a href="javascript:void(0);" class="m-r-sm link" data-toggle="ajaxModal" data-modal-arguments="vis_module=report&vis_operation=add_schedule_report_inqueue&vis_static_area=vis_open_new_dialog&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&report_type=14" onclick="" type="button"><? echo $vis_language['TXTSCHEDULE']; ?></a></li>
       <li> <a class="m-r-sm link"  href="javascript:void(0);"  data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=get_custom_delete&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&vis_static_area=vis_filter_delete_area&vis_is_report=1" title="<? echo $vis_language['TXTDELETE']; ?>"><? echo $vis_language['TXTDELETE']; ?></a></li>
        </ul>
                  </div>
                 
                    
                     
                     
                  </td><? }else { ?><td align="center"><a class="text-primary m-r-sm link" href="javascript:void(0);" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $filters[$i]['filter_name']; ?>',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':<? echo $filters[$i]['filter_id']?>,'vis_search':2,'vis_report':1,'vis_is_report':0});"><? echo $vis_language['TXTSEARCH']; ?></a>
                  <? if( (VIS_STAFF_ID!=1 && $filters[$i]['filter_id']!=25 && $filters[$i]['filter_id']!=26 && $filters[$i]['filter_id']!=27 && $filters[$i]['filter_id']!=28 && $filters[$i]['filter_id']!=29) ||  VIS_STAFF_ID==1){ ?>
                     <a class="text-muted"  href="javascript:void(0);"  data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=get_filter_delete&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&vis_static_area=vis_filter_delete_area&vis_is_report=0" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></i></a>
                     <? }else{?>
                     <a class="text-muted"  href="javascript:void(0);"   title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></i></a>
                     <? }?>
                     
                      <? }?>

                  </tr>																		
																								
																								
					<?php	 
					
					
					/*if($operation['custom_show_report']==7 ) { ?>
						
                  <td align="center" >
                  <div id="option_<? echo $i; ?>" style="display:block; width:10;">
                  	<button class="btn btn-sm dropdown-toggle" data-toggle="dropdown" style="padding:0px; background:none;"><i class="vh vh-action text-muted"></i> <b class="caret"></b></button>
						  <ul class="dropdown-menu dropdown-menu-right text-left">
        <li><a class="text-primary m-r-sm link" href="javascript:void(0);" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $filters[$i]['filter_name']; ?>',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':<? echo $filters[$i]['filter_id']?>,'vis_search':3,'vis_report':1,'vis_is_report':1});"><? echo $vis_language['TXTGENRATE']; ?></a></li>
        <li><a href="javascript:void(0);" class="m-r-sm link" data-toggle="ajaxModal" data-modal-arguments="vis_module=report&vis_operation=add_report_inqueue&vis_static_area=vis_open_new_dialog&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&report_type=14" type="button"><? echo $vis_language['TXTEXPORT']; ?></a></li>
    <li><a href="javascript:void(0);" class="m-r-sm link" data-toggle="ajaxModal" data-modal-arguments="vis_module=report&vis_operation=add_schedule_report_inqueue&vis_static_area=vis_open_new_dialog&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&report_type=14" onclick="" type="button"><? echo $vis_language['TXTSCHEDULE']; ?></a></li>
       <li> <a class="m-r-sm link"  href="javascript:void(0);"  data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=get_custom_delete&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&vis_static_area=vis_filter_delete_area&vis_is_report=1" title="<? echo $vis_language['TXTDELETE']; ?>"><? echo $vis_language['TXTDELETE']; ?></a></li>
        </ul>
                  </div>
                 
                    
                     
                     
                  </td><? }else { ?><td align="center"><a class="text-primary m-r-sm link" href="javascript:void(0);" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $filters[$i]['filter_name']; ?>',{'vis_module':'ticket','vis_operation':'filter_ticket', 'vis_filter_id':<? echo $filters[$i]['filter_id']?>,'vis_search':2,'vis_report':1,'vis_is_report':0});"><? echo $vis_language['TXTSEARCH']; ?></a>
                     <a class="text-muted"  href="javascript:void(0);"  data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=get_filter_delete&vis_filter_id=<? echo $filters[$i]['filter_id'];?>&vis_static_area=vis_filter_delete_area&vis_is_report=0" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></i></a> <? }?>

                  </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 }
   		]
   	});
   });
</script>
<script src="<?= VIS_PATH_SCRIPT; ?>dropdown_dropup.js"></script>