<? global $vis_language; ?>
<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['TXTTITLE']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTSUBJECT']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTDISPLAYORDER']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
         <th></th>
         <th></th>
      </tr>
   </thead>
   <tbody>
      <?
         for($i=0;$i<$etemplate_info['etemplate_count'];$i++) {
										$display_order=($etemplate_details[$i]['display_order']=='')?0:$etemplate_details[$i]['display_order'];
			 if($etemplate_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
             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="'.$etemplate_details[$i]['etemplate_id'].'" /><i></i></label></td>';
             echo '<td><a href="#/setting/etemplate_details/'.str_replace('/', ' ', $etemplate_details[$i]['etemplate_name']).'/'.$etemplate_details[$i]['etemplate_id'].'">'.$etemplate_details[$i]['etemplate_name'].'</a></td>';
			 echo '<td><a href="#/setting/etemplate_details/'.str_replace('/', ' ', $etemplate_details[$i]['subject']).'/'.$etemplate_details[$i]['etemplate_id'].'">'.$etemplate_details[$i]['subject'].'</a></td>';
				 echo '<td><a href="#/setting/etemplate_details/'.str_replace('/', ' ', $etemplate_details[$i]['etemplate_name']).'/'.$etemplate_details[$i]['etemplate_id'].'">'.$display_order.'</a></td>';
			 echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>'; 
             echo '<td align="right"><a class="link" href="#/setting/clone_etemplate/'.$etemplate_details[$i]['etemplate_id'].'">'.$vis_language['TXTCLONE'].'</a></td>'; ?>
      <td align="center"> 
		 <?  if($etemplate_details[$i]['default_id'] == 0){?>
		  <a class="text-muted" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_etemplate_delete&vis_etemplate_id=<? echo $etemplate_details[$i]['etemplate_id']; ?>&vis_static_area=vis_etemplate_delete_form" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></i></a>
		   <? } ?>
		  </td> 
          </tr>
         <? } ?>
   </tbody>
</table>
<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 },
   			{ "bSortable": false }
   		]
   	});
   });
</script>
