<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title><spring:message code="user.login.submit"/></title>
    <meta name="decorator" content="default"/>
    <%@include file="/WEB-INF/views/include/head.jsp" %>
    <link rel="stylesheet" href="${ctxStatic}/common/login.css">
    <script type="text/javascript">
        $(document).ready(function () {
            if (self.frameElement && self.frameElement.tagName == "IFRAME") {
                parent.location.reload();
            }
            load();
        });
        function page(n, s) {
            $("#pageNumber").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<div class="container">
<div class="wp">
  <div class="header cl">
  	<div class="z"><span class="current">当前学校：${school.name }</span></div>
    <div class="y">
    	<a class="user" href="">${query.name }</a>
    	<a href="javascript:location.replace(location);">退出</a>
    </div>
  </div>
  <div class="table">
  <form id="searchForm" action="${ctx}/student/${school.id}" method="post" style="display:none">
  	<input type="hidden" name="studentCode" value="${query.studentCode }"/>
  	<input type="hidden" name="name" value="${query.name }"/>
    <input type="hidden" id="pageNumber" name="pageNumber" value="${query.pageNumber }"/>
    <input type="hidden" id="pageSize" name="pageSize" value="${query.pageSize }"/>
  </form>
  	<table cellpadding="0" cellspacing="0" width="100%">
    	<thead>
        	<tr>
            	<td data-i18n-text="student.search.list.examName">考试名称</td>
            	<td data-i18n-text="student.search.list.subjectName">课程名称</td>
            	<td data-i18n-text="student.search.list.objectiveScore">客观分</td>
            	<td data-i18n-text="student.search.list.subjectiveScore">主观分</td>
            	<td data-i18n-text="student.search.list.totalScore">总分</td>
            	<td data-i18n-text="student.search.list.remark">备注</td>
            </tr>
        </thead>
    	<tbody>
    	 <c:forEach items="${query.result}" var="student">
        	<tr>
            	<td>${student.examName }</td>
            	<td>${student.subjectCode }_${student.subjectName }</td>
            	<td>
                <c:choose>
                    <c:when test="${student.absent == true || student.upload == false }">
                        -
                    </c:when>
                    <c:when test="${student.breach == true}">
                        0
                    </c:when>
                    <c:otherwise>
                        ${student.objectiveScoreString}
                    </c:otherwise>
                </c:choose>
            	</td>
            	<td>
                <c:choose>
                    <c:when test="${student.absent == true || student.upload == false }">
                        -
                    </c:when>
                    <c:when test="${student.breach == true}">
                        0
                    </c:when>
                    <c:otherwise>
                        ${student.subjectiveScoreString}
                    </c:otherwise>
                </c:choose>
            	</td>
            	<td>
                <c:choose>
                    <c:when test="${student.absent == true || student.upload == false }">
                        -
                    </c:when>
                    <c:when test="${student.breach == true}">
                        0
                    </c:when>
                    <c:otherwise>
                        ${student.totalScoreString}
                    </c:otherwise>
                </c:choose>
            	</td>
            	<td><c:if test="${student.absent == true || student.upload == false }">
                    缺考
                	</c:if>
                </td>
            </tr>
          </c:forEach>
        </tbody>
    </table>
  </div>
  <div class="page">
   <!--  	<span class="pre"><a href="">上页</a></span>
        <span class="cl">
          <a class="current" href="">1</a>
          <a href="">2</a>
          <a href="">3</a>
        </span>
    	<span class="next"><a href="">下页</a></span> -->
    	${query }
    </div>
</div>
</div>
</body>
</html>