<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	// nginx proxy: proxy_set_header 	X-Scheme 	$scheme; 
	String scheme = request.getHeader("X-Scheme");
	if (scheme == null) {
		scheme = request.getScheme();
	}
	int port = request.getServerPort();
	String basePath = scheme + "://" + request.getServerName() + ((port == 80 || port == 443) ? "" : (":" + port)) + path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<title>控制台-账户中心</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="<%=basePath%>">
<link rel="shortcut icon" href="static/img/icon.png">
<link rel="stylesheet" type="text/css"
	href="static/lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="static/lib/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css"
	href="static/lib/css/toastr.min.css">
<link rel="stylesheet" type="text/css" href="static/css/console.css" />
<meta name="referrer" content="origin" />
</head>
<body class="home-template">
	<!-- navigation start -->
	<c:set var="module" value="setting" scope="session" />
	<jsp:include page="header.jsp" />
	<!-- navigation end -->

	<!-- main area start -->
	<div class="x-container">
		<div class="container">
			<div class="x-content-wrap clearfix" style="margin: 0 -15px">
				<div class="x-content">
					<div class="nav nav-tabs x-nav-tabs hidden-xs">
						<h2 class="hidden-xs">
							<i class="fa fa-file-text-o"></i> 设置
						</h2>
					</div>
					<!-- 列表 start -->
					<div class="x-mod x-list x-list-2x x-chunk-list-wrap">
						<div class="x-mod-body">
							<!-- view start -->
							<div id="app_list" class="x-chunk-list">
								<c:forEach items="${content}" var="setting">
									<div class="x-item">
										<div class="x-icon">
											<i class="fa fa-cog"></i>
										</div>
										<p class="x-title">
											<a class="x-text x-editor-trigger" href="javascript:;"
												data-id="${setting.key}">${setting.description}</a>
										</p>
										<div class="text-muted">
											<span class="x-text"> <i
												class="fa fa-fw fa-check-square-o"></i>${setting.value}</span>
										</div>
									</div>
								</c:forEach>
							</div>
							<!-- view end -->
							<!-- empty tag -->
							<c:if test="${content == null || content.size() == 0}">
								<div class="x-empty">
									<i class="fa fa-coffee"></i>
									<p>
										还没有添加设置，<a class="x-editor-trigger" href="javascript:;">点击添加</a>
									</p>
								</div>
							</c:if>
							<!-- new -->
							<c:if test="${content != null && content.size() > 0}">
								<div class="x-item">
									<div class="x-icon">
										<a class="x-editor-trigger" href="javascript:;" title="添加设置"><i
											class="fa fa-plus"></i></a>
									</div>
								</div>
							</c:if>
						</div>
					</div>
					<!-- 列表 end -->
				</div>
			</div>
		</div>
	</div>
	<!-- main area end -->
	<!-- loading -->
	<div id="loading">
		<div class="x-loading-wrap"></div>
		<div class="x-loading">
			<div></div>
			<div></div>
			<div></div>
		</div>
	</div>
	<script src="static/lib/js/jquery.min.js"></script>
	<script src="static/lib/js/bootstrap.min.js"></script>
	<script src="static/lib/js/toastr.min.js"></script>
	<script src="static/js/base.js"></script>
	<script src="static/js/setting.js"></script>

	<!-- modal -->
	<script type="text/html" id="settingModal">
	<div class="modal fade" role="dialog" aria-labelledby="settingModal_title">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="settingModal_title">设置</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal x-form">
						<div class="form-group">
							<label for="description" class="control-label col-sm-2">描述</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" name="description"
									required>
							</div>
						</div>
						<div class="form-group">
							<label for="key" class="control-label col-sm-2">唯一标识</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" name="key" required>
							</div>
						</div>
						<div class="form-group">
							<label for="value" class="control-label col-sm-2">值</label>
							<div class="col-sm-10">
								<input type="text" class="form-control" name="value" required>
							</div>
						</div>
						<div class="form-group" id="allowDeleteWrap">
							<label class="control-label col-sm-2">允许删除</label>
							<div class="col-sm-10">
								<label class="radio-inline"> <input type="radio" name="deleteable" value="1" checked> 是
								</label> <label class="radio-inline"> <input type="radio" name="deleteable" value="0"> 否
								</label>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-blank" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-blank btn-del">删除</button>
					<button type="button" class="btn btn-default btn-submit">保存</button>
				</div>
			</div>
		</div>
	</div>
	</script>
</body>
</html>