<? global $vis_language;
   $paging_list='';
    for($i=0;$i<$view_info['page_count'];$i++) $paging_list.='<option value="'.$i.'" '.(($module_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['view_title']; ?><span id="total_cnt"> (<? echo $module_info['total']; ?>)</span></h3>
      <div>
         <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>
            <li><a class="link" href="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSETTINGS'];?>',{'vis_module':'setting','vis_operation':'setting_menu'});"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
            <li class="active"><? echo $operation['view_title']; ?></li>
         </ul>
      </div>
   </div>
   <div class="col-sm-6 text-right text-left-xs m-t-lg">
      <div class="btn-group">
         <?
            if($operation['vis_operation']!='') { ?>
         <a class="btn btn-rounded btn-primary btn-sm dropdown-toggle" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTADDMODULE']; ?>',{'vis_module':'setting','vis_operation':'<? echo $operation['vis_operation']; ?>', 'cache':true});"><i style="font-size:10px;" class="vh vh-plus"></i>  <? echo $vis_language['TXTADD']; ?></a>  <? } ?>
      </div>
   </div>
</section>
 <? if($view_info['page_count']>0)
   {
   ?>
<div class="col-lg-12">
   <form name="vis_<?php echo $operation['vis_operation']; ?>_form" id="vis_<?php echo $operation['vis_operation']; ?>_form">
      <section class="panel panel-default">
         <div class="row wrapper clr">
            <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">
                        <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_<?php echo $operation['vis_operation']; ?>_form', 'vis_switch':'<?php echo $operation['vis_operation']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_is_enable':'1', 'vis_page':'<? echo $module_info['page']; ?>'})"><? echo $vis_language['TXTENABLE']; ?></a></li>
                        <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_<?php echo $operation['vis_operation']; ?>_form', 'vis_switch':'<?php echo $operation['vis_operation']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_is_enable':'0', 'vis_page':'<? echo $module_info['page']; ?>'})"><? 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">
               <select name="pageing" class="form-control input-sm selectpicker pull-right paging v-middle" onchange="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_operation':'<?php echo $operation['vis_current_operation']; ?>', 'vis_page':this.value})">
               <? echo $paging_list;?>
               </select>
               <div class="text-muted pull-right label_page"><? echo $vis_language['TXTPAGE']; ?>:</div>
            </div>
         </div>
         <div class="table-responsive scroll-x" id="vis_domain_list">
            <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['TXTMODULE']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTTITLE']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTHEADERTITLE']; ?></th>
                     <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
                     <th></th>
                  </tr>
               </thead>
               <tbody>
                  <?
                  for($i=0;$i<$module_info['module_count'];$i++) {
					if($module_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}

					 if($module_details[$i]['module_id']==10 && VIS_ITIL==1){ echo '<tr>';?>
                        <td width="30"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_<? echo $i; ?>" id="vis_global_mass_chk_<? echo $i; ?>" value="<? echo $module_details[$i]['module_id']; ?>" <? if($module_details[$i]['module_id']<=3) { ?> onclick='$("#vis_global_msg_div").visInterface("load_global_message", "<? echo $vis_language['MSGCOREMODULESTATUS']; ?>"); return false;' <? } ?> /><i></i></label></td>
						<? echo '<td><a href="#/setting/module_details/'.rawurlencode(str_replace("/"," ",$module_details[$i]['module_name'])).'/'.$module_details[$i]['module_id'].'">'.$module_details[$i]['module'].'</a></td>';
                         echo '<td><a href="#/setting/module_details/'.rawurlencode(str_replace("/"," ",$module_details[$i]['module_name'])).'/'.$module_details[$i]['module_id'].'">'.$module_details[$i]['module_name'].'</a></td>';
                         echo '<td><a href="#/setting/module_details/'.rawurlencode(str_replace("/"," ",$module_details[$i]['module_name'])).'/'.$module_details[$i]['module_id'].'">'.$module_details[$i]['header_title'].'</a></td>';
                         echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>';
           				 if($module_details[$i]['access_type']!=1) { 	?>
							<td align="center"> <a class="text-muted" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_module_delete&vis_module_id=<? echo $module_details[$i]['module_id']; ?>&vis_static_area=vis_module_delete_form&vis_page=<? echo $module_info['page']; ?>" title="<? echo $vis_language['TXTDELETE']; ?>" href="javascript:void(0);" ><i class="vh vh-delete-round"></i></a></td>
						<? } else echo '<td align="center"></td>';	echo '</tr>';
                   }elseif($module_details[$i]['module_id']!=10){ echo '<tr>';?>
					     <td width="30"><label class="checkbox m-n i-checks"><input type="checkbox" name="vis_global_mass_chk_<? echo $i; ?>" id="vis_global_mass_chk_<? echo $i; ?>" value="<? echo $module_details[$i]['module_id']; ?>" <? if($module_details[$i]['module_id']<=3) { ?> onclick='$("#vis_global_msg_div").visInterface("load_global_message", "<? echo $vis_language['MSGCOREMODULESTATUS']; ?>"); return false;' <? } ?> /><i></i></label></td>
						<? echo '<td><a href="#/setting/module_details/'.rawurlencode(str_replace("/"," ",$module_details[$i]['module_name'])).'/'.$module_details[$i]['module_id'].'">'.$module_details[$i]['module'].'</a></td>';
                         echo '<td><a href="#/setting/module_details/'.rawurlencode(str_replace("/"," ",$module_details[$i]['module_name'])).'/'.$module_details[$i]['module_id'].'">'.$module_details[$i]['module_name'].'</a></td>';
                         echo '<td><a href="#/setting/module_details/'.rawurlencode(str_replace("/"," ",$module_details[$i]['module_name'])).'/'.$module_details[$i]['module_id'].'">'.$module_details[$i]['header_title'].'</a></td>';
                         echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>';
           				 if($module_details[$i]['access_type']!=1) { 	?>
							<td align="center"> <a class="text-muted" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_module_delete&vis_module_id=<? echo $module_details[$i]['module_id']; ?>&vis_static_area=vis_module_delete_form&vis_page=<? echo $module_info['page']; ?>" title="<? echo $vis_language['TXTDELETE']; ?>" href="javascript:void(0);" ><i class="vh vh-delete-round"></i></a></td>
						<? } else echo '<td align="center"></td>';echo '</tr>';
					}
					}?>
               </tbody>
            </table>
         </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">
                           <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_<?php echo $operation['vis_operation']; ?>_form', 'vis_switch':'<?php echo $operation['vis_operation']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_is_enable':'1', 'vis_page':'<? echo $module_info['page']; ?>'})"><? echo $vis_language['TXTENABLE']; ?></a></li>
                           <li><a href="javascript:void(0);" onclick="$(this).visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'change_setting_status', 'vis_form':'vis_<?php echo $operation['vis_operation']; ?>_form', 'vis_switch':'<?php echo $operation['vis_operation']; ?>','vis_current_operation':'<?php echo $operation['vis_current_operation']; ?>','vis_current_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_is_enable':'0', 'vis_page':'<? echo $module_info['page']; ?>'})"><? 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">
                  <select name="pageing" class="form-control input-sm selectpicker pull-right paging v-middle" onchange="$(this).parents('#vis_workpanel_div').visExecution('load_area',{'vis_module':'<?php echo $operation['vis_current_module']; ?>', 'vis_operation':'<?php echo $operation['vis_current_operation']; ?>', 'vis_page':this.value})">
                  <? echo $paging_list;?>
                  </select>
                  <div class="text-muted pull-right label_page"><? echo $vis_language['TXTPAGE']; ?>:</div>
               </div>
            </div>
         </footer>
      </section>
   </form>
</div>
<script src="<?= VIS_PATH_SCRIPT; ?>dropdown_dropup.js"></script>
<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,
   		  	null,
   			{ "bSortable": false }
   		]
   	});
   });
</script>
<?
}
else
{
 include(VIS_PATH_TEMPLATE.'no_record_yet.php');
} ?>
