<%@ 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>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/admin/exam/marker?subjectCode=${subject.code}">评卷员管理</a></li>
		<li  class="active"><a href="#">科目：${subject.code }-${subject.name } 设置</a></li>
	</ul>
	<form id="searchForm"  action="${ctx}/admin/exam/marker/save" method="post" class="breadcrumb form-search">
		<input type="hidden" name="subjectCode" value="${subject.code}"/>
		<div>
			<input id="addSubmit" class="btn btn-primary" type="button" value="绑定" onclick="goAdd()"/>
		</div>
	</form>
	<tags:message content="${message}"/>
	<form id="addForm"  action="${ctx}/admin/exam/marker/add" method="post" class="breadcrumb form-search">
	<input type="hidden" id="subjectCode" name="subjectCode" value="${subject.code}"/>
	<input type="hidden" name="userIds" value="${userIds}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th><input type="checkbox" id="groupNumbers">分组序号</th>
        <th>大题号</th>
        <th>大题名称</th>
        <th>步骤分</th>
        <th>选做题组</th>
        <th>评卷员人数</th>
        <th>任务总数</th>
        <th>完成总数</th>
        <th>剩余总数</th>
        <th>正在评卷</th>
        <th>进度</th>
        <th>评卷区设置</th>
        <th>状态</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${resultList}" var="result">
        <tr>
            <td><input type="checkbox" class="groupNumbers" name="groupNumbers" value="${result.number}">${result.number}</td>
            <td>${result.mainNumber}</td>
            <td>${result.title}</td>
            <td>${result.scoreList}</td>
            <td>${result.selectiveIndex}</td>
            <td>
            ${result.markerCount}
            </td>
            <td>${result.libraryCount}</td>
            <td>${result.markedCount}</td>
            <td>${result.leftCount}</td>
            <td>${result.currentCount}</td>
            <td>${result.percent}%</td>
            <td>
            	<c:if test="${result.picList!=null && result.picList!=''}">是</c:if>
            	<c:if test="${result.picList==null || result.picList==''}">否</c:if>
            </td>
            <td>${result.status.name}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>
	</form>
	<div class="pagination">${query}</div>
<script type="text/javascript">
function goAdd(){
	var check_list = []
	$("input[name='groupNumbers']:checked").each(function(){
		check_list.push($(this).val())
	})
    if(check_list.length==0) {
        alert('请选择分组');
        return false;
    }
	$("#addForm").submit();
	return false;
}
</script>	
</body>
</html>