<? 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 class="txt_nowrap"><? echo $vis_language['TXTOWNER']; ?></th>
			<th><? echo $vis_language['TXTTITLE']; ?></th>
			<th class="txt_nowrap"><? echo $vis_language['TXTLISTCOUNT']; ?></th>				
			<th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>						
			<th></th>
		</tr>
	</thead>
	<tbody>			  
<?
    if($view_details!=-1) for($i=0;$i<count($view_details);$i++) {
        if($view_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
        $default=($view_details[$i]['is_set']==1)?$vis_language['TXTYES']:$vis_language['TXTNO'];
        if($view_details[$i]['view_id']==1) $default='Default';
		echo '<tr>'; ?>
		<td width="30"><label class="checkbox m-n i-checks" <? if($view_details[$i]['view_id']==1) { ?> onclick='$("#vis_global_msg_div").visInterface("load_global_message", "<? echo $vis_language['MSGCOREVIEWSTATUS']; ?>"); return false;' <? } ?> ><input type="checkbox" name="vis_global_mass_chk_<? echo $i; ?>" id="vis_global_mass_chk_<? echo $i; ?>" value="<? echo $view_details[$i]['view_id']; ?>" <? if($view_details[$i]['view_id']==1) { ?> disabled="disabled" <? } ?> /><i></i></label></td>
      <? $owner = ($view_details[$i]['view_id']==1)?'System':$view_details[$i]['owner_name']; echo '<td><a href="#/home/view_details/'.str_replace('/', ' ', $view_details[$i]['view_name']).'/'.$view_details[$i]['view_id'].'">'.$owner.'</a></td>';
        echo '<td><a href="#/home/view_details/'.str_replace('/', ' ', $view_details[$i]['view_name']).'/'.$view_details[$i]['view_id'].'">'.$view_details[$i]['view_name'].'</a></td>';
        echo '<td><a href="#/home/view_details/'.str_replace('/', ' ', $view_details[$i]['view_name']).'/'.$view_details[$i]['view_id'].'">'.$view_details[$i]['page_count'].'</a></td>';
        echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>'; ?>
        <? if($view_details[$i]['view_id']!=1): ?>
			<td align="center"><a class="text-muted" href="javascript:void(0);" data-toggle="ajaxModal" data-modal-arguments="vis_module=home&vis_operation=get_view_delete&vis_view_id=<? echo $view_details[$i]['view_id']; ?>&vis_static_area=vis_view_delete_form" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></i></a></td>
       <? else: ?>
			<td></td>
       <? endif; ?>
        
        </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 }
		]
	});
});
</script>


