<? global $vis_language;
   $paging_list='';
     for($i=0;$i<$view_info['page_count'];$i++) $paging_list.='<option value="'.$i.'" '.(($filters_info['page']==$i)?'selected="selected"':'').'>'.($i+1).'</option>';
   ?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6">
        <h3 class="m-b-xs text-black"><? echo ($operation['custom_show_report']==7)?$vis_language['TXTCUSTOMREPORTS']:$vis_language['TXTFILTERS']; ?><span id="total_cnt"> (<? echo $filters_info['count']; ?>)</span></h3> 
      <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
         <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
         <? if($operation['custom_show_report']==7) { ?>
          <li><a class="link" href="#/report/report_list/<? echo $vis_language['TXTREPORTS']; ?>"><?= $vis_language['TXTREPORTS']; ?></a></li>
           <? }else{ ?>
          <li><a class="link" href="#/ticket/filter_ticket/<? echo $vis_language['TXTTICKETS']; ?>/1"><?= $vis_language['TXTINBOX']; ?></a></li>
          <li ><a class="link" href="#/ticket/ticket_search/<? echo $vis_language['TXTSEARCH']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<? echo $vis_language['TXTSEARCH']; ?>', {'vis_module':'ticket', 'vis_operation':'ticket_search'})"><? echo $vis_language['TXTSEARCH']; ?></a></li> 
										<? } ?>
		      
         <li class="active"><? echo ($operation['custom_show_report']==7)?$vis_language['TXTCUSTOMREPORTS']:$vis_language['TXTFILTERS']; ?></li> 
      </ul>
   </div>
   <div class="col-sm-6 text-right text-left-xs m-t-lg">
   <? if($operation['custom_show_report']==7) { ?>
			<a class="btn btn-rounded btn-primary btn-sm dropdown-toggle" href="#/ticket/ticket_search/<? echo $vis_language['TXTCUSTOMREPORT']; ?>/6"  ><i style="font-size:10px;" class="vh vh-plus"></i> <? echo $vis_language['TXTADD']; ?></a>
   
    <? include(VIS_PATH_TEMPLATE.'report_left_menu.php'); ?>
 <? }else{?>
 <div class="btn-group">
			<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><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="link" href="#/ticket/ticket_search/<? echo $vis_language['TXTSEARCH']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<? echo $vis_language['TXTSEARCH']; ?>', {'vis_module':'ticket', 'vis_operation':'ticket_search'})"><? echo $vis_language['TXTADVANCEDSEARCH']; ?></a></li>
         </ul>
   </div>
 <? }?>
 </div>
</section>
<? if($view_info['page_count']>0)
   {
   ?>
<script> $("#view_action").show(); $("#vis_filter_form .panel-footer").show(); $("#vis_filter_list").show(); </script>
<div  class="col-lg-12">
   <form name="vis_filter_form" id="vis_filter_form" method="post">
      <section class="panel panel-default" >
         <div class="row wrapper clr" id="view_action">
            <div class="col-sm-9 tkt_left_menu">
               <div class="vis_mass_action">
                  <div class="btn-group">
                     <button class="btn bg-empty btn-sm dropdown-toggle action_btn" data-toggle="dropdown">
                     <i class="vh vh-action"></i> <span class="caret"></span>
                     </button>
                     <ul class="dropdown-menu">
                     <? if($operation['custom_show_report']==7) { ?>
                      <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'ticket', 'vis_operation':'delete_mass_filter', 'vis_form':'vis_filter_form', 'vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_action':'#/<?php echo $operation['vis_current_module']; ?>/<?php echo $operation['vis_current_operation']; ?>/<? echo $vis_language['TXTCUSTOMREPORT']; ?>/7'})"><? echo $vis_language['TXTDELETE']; ?></a></li>
                     <? }else{ ?>
                        <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'home', 'vis_operation':'change_setting_status', 'vis_form':'vis_filter_form', 'vis_switch':'filter','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_is_enable':'1'})"><? echo $vis_language['TXTENABLE']; ?></a></li>
                        <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'home', 'vis_operation':'change_setting_status', 'vis_form':'vis_filter_form', 'vis_switch':'filter','vis_current_module':'<?php echo $operation['vis_current_module']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>', 'vis_is_enable':'0'})"><? echo $vis_language['TXTDISABLE']; ?></a></li>
                        <? }?>
                     </ul>
                  </div>
               </div>
            </div>
            <div  class="col-sm-3 text-right text-center-xs tkt_right_menu" id="paging">
              <div class="text-right">
	   <ul style="margin:0px;" class="pagination pagination-sm m-t-xs pagination_ticket_list"><li class="first"><a href="javascript:void(0);"><i class="vh vh-angle-double-left"></i></a></li><li class="prev"><a href="javascript:void(0);"><i class="vh vh-angle-left"></i></a></li><li class="page active"><a href="javascript:void(0);">1</a></li><li class="next"><a href="javascript:void(0);"><i class="vh vh-angle-right"></i></a></li><li class="last"><a href="javascript:void(0);"><i class="vh vh-angle-double-right"></i></a></li></ul>
	</div>
            </div>
         </div>
         <div class="table-responsive" id="vis_filter_list">
            	<? include_once(VIS_PATH_TEMPLATE.'filter_list.php'); ?>
         </div>
         <footer class="wrapper panel-footer bg-white">
            <div class="row">
               <div class="col-sm-9 tkt_left_menu">
                  <div class="vis_mass_action_footer">
                     <div class="btn-group">
                        <button type="button" class="btn bg-empty btn-sm dropdown-toggle action_btn" data-toggle="dropdown">
                        <i class="vh vh-action"></i>
                        <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                         <? if($operation['custom_show_report']==7) { ?>
                          <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'ticket', 'vis_operation':'delete_mass_filter', 'vis_form':'vis_filter_form', 'vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_action':'#/<?php echo $operation['vis_current_module']; ?>/<?php echo $operation['vis_current_operation']; ?>/<? echo $vis_language['TXTCUSTOMREPORT']; ?>/7'})"><? echo $vis_language['TXTDELETE']; ?></a></li>
                         <? }else{ ?>
                           <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'home', 'vis_operation':'change_setting_status', 'vis_form':'vis_filter_form', 'vis_switch':'filter','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_is_enable':'1'})"><? echo $vis_language['TXTENABLE']; ?></a></li>
                           <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'home', 'vis_operation':'change_setting_status', 'vis_form':'vis_filter_form', 'vis_switch':'filter','vis_current_module':'<?php echo $operation['vis_current_module']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>', 'vis_is_enable':'0'})"><? echo $vis_language['TXTDISABLE']; ?></a></li>
                           <? }?>
                        </ul>
                     </div>
                  </div>
               </div>
               <div class="col-sm-3 text-right text-center-xs tkt_right_menu" id="paging">
                 
							<div class="text-right">
	   <ul style="margin:0px;" class="pagination pagination-sm m-t-xs pagination_ticket_list"><li class="first"><a href="javascript:void(0);"><i class="vh vh-angle-double-left"></i></a></li><li class="prev"><a href="javascript:void(0);"><i class="vh vh-angle-left"></i></a></li><li class="page active"><a href="javascript:void(0);">1</a></li><li class="next"><a href="javascript:void(0);"><i class="vh vh-angle-right"></i></a></li><li class="last"><a href="javascript:void(0);"><i class="vh vh-angle-double-right"></i></a></li></ul>
	</div>
					
               </div>
            </div>
         </footer>
      </section>
   </form>
</div>
<?
}
else
{
 include(VIS_PATH_TEMPLATE.'no_record_yet.php');
 echo '<script> $("#view_action").hide(); $("#vis_filter_form .panel-footer").hide(); $("#vis_filter_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
} ?>
<script type="text/javascript">
  <? if($view_info['page_count']>0) {?>
       $('.pagination_ticket_list').twbsPagination({
   		totalPages:<?php echo $view_info['page_count']; ?>,
   		visiblePages:3,
   		first:'<i class="vh vh-angle-double-left"></i>',prev:'<i class="vh vh-angle-left"></i>',next:'<i class="vh vh-angle-right"></i>',last:'<i class="vh vh-angle-double-right"></i>',
   		onPageClick: function (event, page) {     
   		$.ajax({
   		url: 'index.php',
   		data: {'vis_module':"ticket", 'vis_operation':"view_filters", 'vis_action':"<?= $operation['vis_action']?>",'vis_page':page-1, 'vis_form':'vis_filter_form' <? if($operation['custom_show_report']==7){?>,'custom_show_report':<?=$operation['custom_show_report']?><? }?>,'vis_filter':1},
   		type: "POST",
   		success: function(data) {            
   			$("#vis_filter_list").html(data);
   		}
   		});
             }
         });
   <? }?>
</script>
