<%@ 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/scan/subject">按科目统计</a></li>
    <li><a href="${ctx}/admin/exam/scan/examSite">按考点统计</a></li>
    <!--<li><a href="${ctx}/admin/exam/scan/campus">按学习中心统计</a></li>-->
    <li class="active"><a href="${ctx}/admin/exam/scan/package">统计签到表</a></li>
</ul>
<form id="searchForm" action="${ctx}/admin/exam/scan/package" 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 }"/>
    
    <label>编号</label>
    <input type="text" name="code" value="${query.code}" class="input-medium"/>
    &nbsp;
    <label>状态</label>
    <select name="upload" class="input-small">
        <option value="">不限</option>
        <option value="false" <c:if test="${query.upload!=null && query.upload==false}">selected</c:if>>未上传</option>
        <option value="true" <c:if test="${query.upload!=null && query.upload==true}">selected</c:if>>已上传</option>
    </select>
    &nbsp;
    <input id="btnSubmit" class="btn btn-primary" type="button" value="查询" onclick="goSearch()"/>
    &nbsp;
    <input id="btnTotalCount" class="btn" type="button" value="总数：${totalCount}"/>
</form>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>签到表编号</th>
        <th>图片数量</th>
        <th>查看图片</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${packageList}" var="pac">
        <tr>
            <td>${pac.code}</td>
            <td>${pac.picCount}</td>
            <td>
            	<c:if test="${pac.picCount!=0}">
                	<a class="view-link" href="##" data-image-url="${pac.urlString}" data-title="${pac.code}">查看</a>
                </c:if>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${query}</div>
<%@include file="/WEB-INF/views/include/imageView.jsp" %>
<script type="text/javascript">
    $(document).ready(function () {
        /* new jBox('Image', {
            imageFade: 0,
            delayOpen: 0,
            delayClose: 0,
            maxHeight: $(window).height()*0.88
        }); */
        $('.view-link').click(function () {
            initImagePopover($(this).attr('data-title'), '${fileServer}', $(this).attr('data-image-url'));
            return false;
        });
    });

    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>