<? global $vis_language;   
if($exotel_apps==-1){   
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_activitylog_form .panel-footer").hide(); $("#vis_exotel_number_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
	<script> $("#view_action").show(); $("#vis_activitylog_form .panel-footer").show(); $("#vis_exotel_number_list").show(); </script>
	<table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
	   <thead class="table_head">		   
		  <tr>
			 <th class="txt_nowrap" width="20%"><? echo $vis_language['TXTTITLE']; ?></th>
			 <th class="txt_nowrap" width="20%"><? echo $vis_language['TXTAPPID']; ?></th>
			 <th class="txt_nowrap"><? echo $vis_language['TXTEXOTELPHONES']; ?></th>
			  <th class="txt_nowrap"><? echo $vis_language['TXTDEPARTMENT']; ?></th>
			 <th></th>
		  </tr>
	   </thead>		   
	   <tbody>
		  <? 
			  if($exotel_apps!=-1) for($i=0;$i<count($exotel_apps);$i++) {
				  $res = $this->get_dept($exotel_apps[$i]['department']);
				  $href='#/setting/exotel_details/'.$exotel_apps[$i]['app_name'].'/'.$exotel_apps[$i]['exotel_id'];?>
				<tr>
					<td><a href='<?=$href?>'><?=$exotel_apps[$i]['app_name']?></a></td>
					<td><a href='<?=$href?>'><?=$exotel_apps[$i]['app_id']?></a></td>
					<td><a href='<?=$href?>'><?=$exotel_apps[$i]['exophones']?></a></td>
					<td><a href='<?=$href?>'><?=$res[0]['domain_name'].'::'.$res[0]['department_name']?></a></td>
					<td align="center"><a class="text-muted" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_exotel_delete&vis_app_id=<?php echo $action[4]; ?>&vis_exotel_id=<? echo $exotel_apps[$i]['exotel_id']; ?>" title="<? echo $vis_language['TXTDELETE']; ?>" href="javascript:void(0);" ><i class="vh vh-delete-round"></a></td>
				 </tr>
			<?php } ?>
	   </tbody>
	</table>
	<script type="text/javascript">
		$(".selectpicker").selectpicker();  
	</script>
<? } ?>