<section id="vis_workpanel" class="vbox">
   <section class="scrollable" id="vis_workpanel_div" style="display: block;">
      <section class="row m-b m-l m-r" id="breadcrumb">
         <? include_once(VIS_PATH_TEMPLATE.'forum_header.php'); ?>
      </section>
      <section class="col-lg-12">
         <div style="display:none;" id="vis_filter_list" class="wrapper bg-white clr"></div>
      </section>
      <? if($forumTopic != -1){ ?>
      <div class="col-lg-12">
         <form method="POST" id="vis_forum_activity_form" name="vis_forum_activity_form">
            <input type="hidden" value="filter_ticket" id="vis_operation">
            <input type="hidden" value="Tickets" id="view_title">
            <section class="panel panel-default">
               <div id="view_action" class="row wrapper clr" style="height:50px">
                  <header class="col-sm-12">
                     <div class="pull-right">
                       <div class="label_page pull-right">
						  <ul class="navSeprator no-padder m-n">
							 <li><a class="<?php echo ($sort_by == '')?'vis_sub_header_selected':'link'; ?>" href="javascript:void(0);" value="0" onclick="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'forums', 'vis_operation':'forum_filter', 'vis_sorted_by':' ', 'vis_form':'vis_forum_activity_form','vis_filter_id':'<?= $filter_id;?>'})"><? echo $vis_language['TXTALL'].' ( '.$quick_view['all'].' )'; ?></a></li>
							 <li><? if($quick_view['new']!=0){?><a class="<?php echo ($sort_by == 'parent_type=0')?'vis_sub_header_selected':'link'; ?>" href="javascript:void(0);" value="parent_type=0" onclick="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'forums', 'vis_operation':'forum_filter', 'vis_sorted_by':'parent_type=0','vis_form':'vis_forum_activity_form','vis_filter_id':'<?= $filter_id;?>'})"><? echo $vis_language['TXTNEWTOPICS'].' ( '.$quick_view['new'].' )'; ?></a><?} else { ?><label class="text-muted"><? echo $vis_language['TXTNEWTOPICS'].' ( '.$quick_view['new'].' )'; ?></label><? }?></li>
							 <li><? if($quick_view['reply']!=0){?><a class="<?php echo ($sort_by == 'parent_type=1')?'vis_sub_header_selected':'link'; ?>" href="javascript:void(0);" value="parent_type=1" onclick="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'forums', 'vis_operation':'forum_filter', 'vis_sorted_by':'parent_type=1','vis_form':'vis_forum_activity_form','vis_filter_id':'<?= $filter_id;?>'})"><? echo $vis_language['TXTREPLY'].' ( '.$quick_view['reply'].' )'; ?></a><?} else { ?><label class="text-muted"><? echo $vis_language['TXTREPLY'].' ( '.$quick_view['reply'].' )'; ?></label><? }?></li>
						  </ul>
						</div>
						
                     </div>
                     <!--/ .pull-right -->
                     <div id="tkt_left_menu">
						 <?if($filter_id!=1 && $filter_id!=2){?>
                        <div class="vis_mass_action">
                           <div class="pull-left">
                              <button data-toggle="dropdown" class="btn bg-empty btn-sm dropdown-toggle action_btn">
                              <i class="vh vh-action"></i> <span class="caret"></span>
                              </button>
                              <ul class="dropdown-menu">
								 <? if($filter_id==3) { ?><li><a onclick="$('#vis_global_msg_div').visExecution('submit_form',{'vis_module':'forums', 'vis_operation':'change_forum_activity_setting', 'vis_form':'vis_forum_activity_form','vis_switch':'approve','vis_filter_id':'<?= $filter_id;?>'});" href="javascript:void(0);"><? echo $vis_language['TXTAPPROVE']; ?></a></li><? } ?>
                                 <li><a onclick="$('#vis_global_msg_div').visExecution('submit_form',{'vis_module':'forums', 'vis_operation':'change_forum_activity_setting','vis_form':'vis_forum_activity_form','vis_switch':'spam','vis_spam':'<?echo ($filter_id==4)?0:1?>','vis_filter_id':'<?= $filter_id;?>'});" href="javascript:void(0);"><? echo ($filter_id==4)?$vis_language['TXTREMOVESPAM']:$vis_language['TXTMARKSPAM']; ?></a></li>
                                 <li><a data-toggle="ajaxModal" id="del" onclick="delete_forum_activity();" href="javascript:void(0);"><? echo $vis_language['TXTDELETE']; ?></a></li>
                              </ul>
                           </div>
                          
                        </div><? } ?>
                     </div>
                  </header>
               </div>
               <div id="vis_ticket_list" class="table-responsive scroll-x">
                  <script> $("#view_action").show(); $("#vis_ticket_form .panel-footer").show(); $("#vis_ticket_list").show(); </script>
                    <div role="grid" class="dataTables_wrapper" id="DataTables_Table_1_wrapper">
                     <table data-ride="datatables" class="table table-hover m-b-none dataTable" id="DataTables_Table_1">
						 <?if($filter_id!=1 && $filter_id!=2){?> 
                        <thead class="table_head">
                           <tr role="row">
                              <th width="42px" class="p-r-none sorting_disabled" role="columnheader" rowspan="1" colspan="1" >
                                 <?if($filter_id!=1 && $filter_id!=2){?>
                                 <div class="btn-group list_chkbox_action">
                                    <label style="float: left;" class="checkbox m-n m-r-sm i-checks"><input type="checkbox"><i></i></label>
                                 </div><? } ?>
                              </th>
                              <th class="sorting_disabled"  role="columnheader" rowspan="1" colspan="1" aria-label="" >
                              
											</th>
                              <th role="columnheader" tabindex="0" width="65%" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" ><span class="m-l-lg text-md hidden-nav-xs text-black"><?php echo $forumDetails['forum_title'];?></span></th>
                              <th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" aria-label="" width="30%"></th>
                           </tr>
                        </thead><? } ?>
                      <?include(VIS_PATH_TEMPLATE.'load_forum_activity.php');?>
                     </table>
                  </div>
                 
                  <script>
                     $(".selectpicker").selectpicker();
                        
                  </script>
                  <input type="hidden" value="" name="vis_domain_id" id="vis_domain_id">
               </div>
               <? if($forumTopic!=0 && $total_pages>1){?>
                <footer class="wrapper " id="load_more_activities">
					<div class="row">
                  <div onclick="javascript:forum_filter(<?= $page+1;?>);">
						<div style="text-align: center;">
							<span class="link vis-pointer"><?= $vis_language['TXTLOADMORE'];?></span>
						</div>
						</div>
						</div>
						</footer><? } ?>
            </section>
         </form>
      </div>
      <section style="display:none;" id="vis_no_record_search" class="fullFrame m-n"></section>
       <?php }
else
{
	include(VIS_PATH_TEMPLATE.'no_record_yet.php');
} ?>
      
      <script></script>
      <script src="../scripts/dropdown_dropup.js"></script>
   </section>
</section>
<script type="text/javascript">
   $("tr").hover(
     function () {
     var id=this.id;
     	//$("#description"+id).css("display","block");
     	$("#vis_activities"+id).css("display","block");
     	//$("#vis_activitiess"+id).css("display","block");
     	
     });
     $("tr").mouseleave(
     function () {
     var id=this.id;
     	//$("#description"+id).css("display","none");
		$("#vis_activities"+id).css("display","none");
		//$("#vis_activitiess"+id).css("display","block");
   });
    function forum_filter(page){
	$.post("index.php?vis_module=forums&vis_operation=forum_filter&vis_filter_id=<?= $filter_id;?>&vis_sorted_by=<?= $sort_by;?>&vis_tmpst="+new Date().getTime(),{'vis_page': page}, function(data) {
		$("#load_more_activities").last().remove();
		$("#DataTables_Table_1").last().append(data);
	});
	}
	function delete_forum_activity()
    {
		var selected = [];
		var selected1 = [];
		var vis_action = "";
		$('#checkbox_data input:checked').each(function() {
		selected.push($(this).attr('name'));
		selected1.push($(this).attr('value'));
		vis_action +=$(this).attr('name')+"="+$(this).attr('value')+",";
		});
		vis_action= vis_action.substring(0, vis_action.length-1);
		$('#del').attr('data-toggle','ajaxModal');
		$('#del').attr('data-modal-arguments','vis_module=forums&vis_operation=get_delete_forum_activity&vis_action='+vis_action+'&vis_switch=delete&vis_static_area=vis_activity_delete_area&vis_filter_id=<?php echo $filter_id; ?>');
	 }
</script>
