<div class="row">
	<div class="col-lg-12">
		<h1 class="site-h1" style="background-color:#FFFFFF;">
			区域列表<#if areaList??>（${areaList?size}）</#if>
			<span style="float:right;">
				<button class="layui-btn layui-btn-small green" href="/admin/area/add.html" data-toggle="ajax" data-width="750" data-height="450" data-title="创建新区域">
					创建新区域
				</button>
			</span>
		</h1>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12">
				<table class="layui-table" lay-skin="line">
				  <colgroup>
						<col width="10%">
						<col width="85%">
						<col width="1%">
						<col>
				  </colgroup>
				  <thead>
					<tr>
					  <th>名称</th>
					  <th>区域</th>
					  <th style="white-space:nowrap;" nowrap="nowrap">操作</th>
					</tr> 
				  </thead>
				  <tbody>
					<#if areaList??>
					<#list areaList as area>
					<tr>
					  <td>
							${area.name!''}							
					  </td>
					  <td>${area.area!''}</td>
					  <td style="white-space:nowrap;" nowrap="nowrap">
					  		<a href="/admin/area/edit.html?id=${area.id!''}" data-toggle="ajax" data-width="750" data-height="450" data-title="编辑区域信息">
					  			<i class="layui-icon">&#xe642;</i>
					  			编辑
					  		</a>
					  		<a href="/admin/area/delete.html?id=${area.id!''}" style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除区域记录？">
					  			<i class="layui-icon" style="color:red;">&#x1006;</i>
					  			删除
					  		</a>
					  </td>
					</tr>
					</#list>
					</#if>
				  </tbody>
				</table>
			</div> 	   
		</div>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12" id="page" style="text-align:center;"></div>
		</div>
	</div>	
</div>
<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  
		  laypage({
				cont: 'page'
				,pages: <#if userList??>${userList.totalPages}<#else>0</#if> //总页数
				,curr:<#if userList??>${userList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/admin/user/index.html?p="+data.curr ;
					}
				}
		   });
		});
</script>