<!DOCTYPE HTML>
<html>
<head>
<#include "/adminPage/common.html"/>

</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">

		<#include "/adminPage/header.html"/>
		<#include "/adminPage/menu.html"/>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px">
				<fieldset class="layui-elem-field layui-field-title">
					<legend>${menuStr.basic}</legend>
				</fieldset>

				<form action="${ctx}/adminPage/basic" id="searchForm" method="post">
					<div class="layui-form">
						<div class="layui-inline">
							<button type="button" class="layui-btn layui-btn-normal" onclick="add()">${basicStr.add}</button> 
						</div>
					</div>
				</form>

				<table class="layui-table">
					<thead>
						<tr>
							<th>${commonStr.name}</th>
							<th>${commonStr.value}</th>
							<th>${commonStr.operation}</th>
						</tr>
					</thead>
					<tbody>
						<#list basicList as basic>
						<tr>
							<td>${basic.name}</td>
							<td style="width: 50%;">${basic.value}</td>
							<td>
								<button class="layui-btn layui-btn-sm" onclick="edit('${basic.id}')">${commonStr.edit}</button>
								<button class="layui-btn layui-btn-danger layui-btn-sm" onclick="del('${basic.id}')">${commonStr.del}</button>
								
								<button class="layui-btn layui-btn-normal layui-btn-sm" onclick="setOrder('${basic.id}', -1)">${commonStr.up}</button>
								<button class="layui-btn layui-btn-normal layui-btn-sm" onclick="setOrder('${basic.id}', 1)">${commonStr.down}</button>
								
							</td>
						</tr>
						</#list>
					</tbody>
				</table>
			</div>
		</div>
	</div>

	<div style="height: 0px; width: 0px; overflow: hidden;">
		<!-- 弹出框 -->
		<div class="layui-form" id="windowDiv" style="padding: 15px; display: none">
			<form id="addForm">
				<input type="hidden" name="id" id="id">

				<div class="layui-form-item">
					<label class="layui-form-label">${commonStr.name}</label>
					<div class="layui-input-block">
						<input type="text" name="name" id="name" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">${commonStr.value}</label>
					<div class="layui-input-block">
						<textarea  name="value" id="value" class="layui-textarea" ></textarea>
					</div>
				</div>

				<div class="layui-form-item">
					<button type="button" class="layui-btn layui-btn-normal" onclick="addOver()">${commonStr.submit}</button>
					<button type="button" class="layui-btn" onclick="layer.closeAll()">${commonStr.close}</button>
				</div>
			</form>
		</div>

	</div>

	<#include '/adminPage/script.html'/>
	<script src="${ctx}/js/adminPage/basic/index.js?v=${jsrandom}" type="text/javascript"></script>
</body>


</html>