<%@ 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" %>
	<%@include file="/WEB-INF/views/include/dialog.jsp" %>
	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
</head>
<body>
	<%@include file="/WEB-INF/views/include/examInfoNavTabs.jsp" %>
	<form id="searchForm" action="${ctx}/admin/exam-param/subject/mark/list" method="post" class="breadcrumb form-search">
		<input type="hidden" id="pageNumber" name="pageNumber" />
		<input type="hidden" id="pageSize" name="pageSize" value="20"/>
		<div>
			<label>科目：</label>
			<select name="subjectCode">
				<option value="">请选择</option>
				<c:forEach items="${subjectList}" var="subject">
				<option value="${subject.code}" <c:if test="${subject.code==query.subjectCode}">selected</c:if>>${subject.code}-${subject.name}</option>
				</c:forEach>
			</select>
			&nbsp;<label>状态：</label>
			<select name="statusValue">
				<option value="">请选择</option>
				<c:forEach items="${statusList}" var="status">
				<option value="${status.value}" <c:if test="${status.value==statusValue}">selected</c:if>>${status.name}</option>
				</c:forEach>
			</select>
			&nbsp;<input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()"/>
		</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>
				<th>主观大题数</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${query.result}" var="subject">
			<tr>
				<td>${subject.examSubject.code}</td>
				<td>${subject.examSubject.name}</td>
				<td>${subject.status.name}</td>
				<td>${subject.stage.name}</td>
				<td>${subject.subjectiveCount}</td>
				<td>
				<a href="${ctx}/admin/exam-param/subject/mark/detail/${subject.subjectCode}">详细</a>
				<c:if test="${subject.status.value==2}">
				<a href="${ctx}/admin/exam-param/subject/start-mark?subjectCode=${subject.subjectCode}">开始评卷</a>
				</c:if>
				<c:if test="${subject.status.value==1}">
				<a href="${ctx}/admin/exam-param/subject/end-mark?subjectCode=${subject.subjectCode}">结束评卷开始统分</a>
				</c:if>
				</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>