<? global $vis_language; 
$paging_list='';

   for($i=0;$i<$view_info['page_count'];$i++) $paging_list.='<option value="'.$i.'" '.(($ticket_info['page']==$i)?'selected="selected"':'').'>'.($i+1).'</option>'; ?>
<div id="product" class="tab-pane active">
 <form name="vis_<?php echo $operation['vis_operation']; ?>_form" id="vis_<?php echo $operation['vis_operation']; ?>_form">
   <?  if($ciproduct_details==-1){  if(isset($operation['vis_product_id'])){?>
        <a class="link label_page" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=add_ciproduct&vis_static_area=vis_add_ciproduct_dialog&vis_product_id=<? echo $operation['vis_product_id']; ?>&vis_departmentacc=<? echo $operation['vis_departmentacc'];?>"><?= $vis_language['TXTADDVENDOR'];?></a>
        <? }else{ ?>   
        <a class="link label_page" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=add_ciproduct&vis_static_area=vis_add_ciproduct_dialog&vis_vendor_id=<? echo $operation['vis_vendor_id']; ?>&vis_departmentacc=<? echo $operation['vis_departmentacc'];?>"><?= $vis_language['TXTADDPRODUCT'];?></a>
        <? }?>
       <?php     
        
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_'.$operation['vis_operation'].'_form .panel-footer").hide(); $("#vis_domain_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
       <div class="row wrapper " id="view_action">
        <div class="col-sm-12">
            <div  class="text-right text-center-xs pull-right" id="paging">
               <select name="pageing" id="paging" 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>
        <? if(isset($operation['vis_product_id'])){?>
        <a class="link label_page" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=add_ciproduct&vis_static_area=vis_add_ciproduct_dialog&vis_product_id=<? echo $operation['vis_product_id']; ?>&vis_departmentacc=<? echo $operation['vis_departmentacc']; ?>"><?= $vis_language['TXTADDVENDOR'];?></a>
        <? }else{ ?>   
        <a class="link label_page" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=add_ciproduct&vis_static_area=vis_add_ciproduct_dialog&vis_vendor_id=<? echo $operation['vis_vendor_id']; ?>&vis_departmentacc=<? echo $operation['vis_departmentacc']; ?>"><?= $vis_language['TXTADDPRODUCT'];?></a>
        <? }?>
        </div>
       </div>
         
 <div class="row">
<script> $("#view_action").show(); $("#vis_<?php echo $operation['vis_operation']; ?>_form .panel-footer").show(); $("#vis_domain_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 class="txt_nowrap"><? echo $vis_language['TXTVENDOR']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTPRODUCT']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTPRICE']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTQUANTITY']; ?></th>
         <th></th>
      </tr>
   </thead>
   <tbody>
      <?
         for($i=0;$i<count($ciproduct_details);$i++) {
			 if($ciproduct_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
            /* if($ciproduct_details[$i]['product_vendor_id'] == 1){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="'.$ciproduct_details[$i]['product_vendor_id'].'" disabled="disabled"/><i></i></label></td>';}else{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="'.$ciproduct_details[$i]['product_vendor_id'].'" /><i></i></label></td>';} */
             echo '<tr><td><a href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=edit_ciproduct&vis_static_area=vis_edit_ciproduct_dialog&vis_product_vendor_id='.$ciproduct_details[$i]['product_vendor_id'].'&vis_section_area='.$operation['vis_section_area'].'">'.$ciproduct_details[$i]['vendor_name'].'</a></td>';
             echo '<td><a href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=edit_ciproduct&vis_static_area=vis_edit_ciproduct_dialog&vis_product_vendor_id='.$ciproduct_details[$i]['product_vendor_id'].'&vis_section_area='.$operation['vis_section_area'].'">';
			 /*for($p=0;$p<count($ci_product_details);$p++){
			 	if($ci_product_details[$p]['product_id']==$ciproduct_details[$i]['product_id']){
					echo $ci_product_details[$p]['name'];
				}
			 }*/
			 echo $ciproduct_details[$i]['product_name'];
			 echo '</a></td>';
			 echo '<td><a href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=edit_ciproduct&vis_static_area=vis_edit_ciproduct_dialog&vis_product_vendor_id='.$ciproduct_details[$i]['product_vendor_id'].'&vis_section_area='.$operation['vis_section_area'].'">'.$ciproduct_details[$i]['price'].'</a></td>';		
			 echo '<td><a href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=edit_ciproduct&vis_static_area=vis_edit_ciproduct_dialog&vis_product_vendor_id='.$ciproduct_details[$i]['product_vendor_id'].'&vis_section_area='.$operation['vis_section_area'].'">'.$ciproduct_details[$i]['quantity'].'</a></td>';
             ?>
      <td align="center"><a class="text-muted"  href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_product_vendor_delete&vis_product_vendor_id=<? echo $ciproduct_details[$i]['product_vendor_id'];?>&vis_vendor_id=<? echo $ciproduct_details[$i]['vendor_id']; ?>&vis_product_id=<? echo $ciproduct_details[$i]['product_id']; ?>&vis_static_area=vis_product_vendor_delete_form&vis_section=<? echo $operation['vis_section'];?>" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></a><? //} ?></td>
      </tr> <?
         } ?>
   </tbody>
</table>
 </div>
        <div class="row wrapper " id="view_action">
            <div  class="col-sm-12 text-right text-center-xs pull-right" id="paging">
               <select name="pageing" id="paging" 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>


<? } ?>
       
   </form>    
 </div>        
<script type="text/javascript">
   $(document).ready(function() {	
   $('[data-ride="datatables"]').dataTable({		
           "bPaginate" : false,	
   		"sDom": 't', "bAutoWidth": false,
   		"aoColumns": [
   		  	null,
   		  	null,
   		  	null,
			null,
			{ "bSortable": false }
   		]
   	});
   });
</script>