<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>角色管理</title>
<meta name="decorator" content="default" />
<%@include file="/WEB-INF/views/include/head.jsp"%>
<style type="text/css">
.sort {
	color: #0663A2;
	cursor: pointer;
}
</style>
</head>
<body>
	<form id="searchForm" action="${ctx}/admin/basic/role/info/list?schoolId=${query.schoolId}"
		method="post" class="breadcrumb form-search">
		<input type="hidden" id="pageNumber" name="pageNumber"
			value="${query.pageNumber}" /> <input type="hidden" id="pageSize"
			name="pageSize" value="${query.pageSize}" />
		<div>
			<label>角色</label> <select class="input-large" name="role" id="role">
				<option value="">请选择</option>
				<c:forEach items="${roleList}" var="result">
					<option value="${result.code}"
						<c:if test="${result.code==query.role}">selected</c:if>>${result.name}</option>
				</c:forEach>
			</select> &nbsp; <input id="btnSubmit" class="btn btn-primary" type="button"
				value="查询" onclick="goSearch()" />
				&nbsp;
			&nbsp;
			<a href="${ctx}/admin/sys/school" class="btn">返回</a>
		</div>
	</form>
	<tags:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>角色</th>
				<th>更新人</th>
				<th>更新时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${query.result}" var="item">
				<tr>
					<td>${item.name}</td>
					<td>${item.updaterName}</td>
					<td><c:if test="${item.updateTime!=null}">
							<fmt:formatDate value="${item.updateTime}"
								pattern="yyyy-MM-dd HH:mm:ss" />
						</c:if> <c:if test="${item.updateTime==null}">
			                    &nbsp;
			                </c:if></td>
					<td><a href="${ctx}/admin/basic/role/info/privilege?schoolId=${query.schoolId}+&role=${item.code}">编辑</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${query}</div>
	<script type="text/javascript">
		function page(n, s) {
			$("#pageNumber").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
		function goSearch() {
			$("#pageNumber").val(1);
			$("#pageSize").val('${query.pageSize}');
			$("#searchForm").submit();
			return false;
		}
	</script>
</body>
</html>