<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title data-i18n-text="head.title">高校阅卷平台</title>
    <meta name="decorator" content="default"/>
    <%@include file="/WEB-INF/views/include/head.jsp" %>
    <style type="text/css">
        #main {
            padding: 0;
            margin: 0;
        }
        
        #main .container-fluid {
            padding: 0 7px 0 10px;
        }
        
        #header {
            margin: 0 0 10px;
            position: static;
        }
        
        #header li {
            font-size: 14px;
            _font-size: 12px;
        }
        
        #header .brand {
            font-family: Helvetica, Georgia, Arial, sans-serif, 黑体;
            font-size: 26px;
            padding-left: 33px;
        }
        
        #footer {
            margin: 8px 0 0 0;
            padding: 3px 0 0 0;
            font-size: 11px;
            text-align: center;
            border-top: 2px solid #0663A2;
        }
        
        #footer, #footer a {
            color: #999;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#menu a.menu").click(function () {
                $("#menu li.menu").removeClass("active");
                $(this).parent().addClass("active");
                if (!$("#openClose").hasClass("close")) {
                    $("#openClose").click();
                }
            });

            $(".accordion-heading a").click(function () {
                $('.accordion-toggle i').removeClass('icon-chevron-down');
                $('.accordion-toggle i').addClass('icon-chevron-right');
                if (!$($(this).attr('href')).hasClass('in')) {
                    $(this).children('i').removeClass('icon-chevron-right');
                    $(this).children('i').addClass('icon-chevron-down');
                }
            });
            $(".accordion-body a").click(function () {
                $("#menu li").removeClass("active");
                $("#menu li i").removeClass("icon-white");
                $(this).parent().addClass("active");
                $(this).children("i").addClass("icon-white");
            });
            $(".accordion-body a:first i").click();
        });
    </script>
</head>
<body>
<div id="main">
    <div id="header" class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="brand" data-i18n-text="head.title">阅卷平台</div>
            <div class="nav-collapse">
                <%-- <ul id="menu" class="nav">
                  <c:set var="firstMenu" value="true"/>
                  <li class="menu "><a class="menu" href="${ctx }/admin/exam" target="menuFrame" >考试管理</a></li>
                 <li class="menu "><a class="menu" href="" target="menuFrame" >基础管理</a></li>
                </ul> --%>
                
                <ul class="nav pull-right">
                    <li id="themeSwitch" class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="主题切换"><i class="icon-th-large"></i></a>
                        <ul class="dropdown-menu">
                            <li><a href="#" onclick="location='${ctx}/admin/home/theme/default?url='+location.href">默认主题</a></li>
                            <li><a href="#" onclick="location='${ctx}/admin/home/theme/cerulean?url='+location.href">天蓝主题</a></li>
                            <li><a href="#" onclick="location='${ctx}/admin/home/theme/readable?url='+location.href">橙色主题</a></li>
                            <li><a href="#" onclick="location='${ctx}/admin/home/theme/united?url='+location.href">红色主题</a></li>
                            <li><a href="#" onclick="location='${ctx}/admin/home/theme/flat?url='+location.href">Flat主题</a></li>
                        </ul>
                        <!--[if lte IE 6]>
                        <script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->
                    </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">考试：${examName}</a>
                        <ul class="dropdown-menu">
                            <li><a href="#" target="mainFrame" id="exam-select">返回选择考试</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="个人信息">${web_user.name}</a>
                        <ul class="dropdown-menu">
                            <li><a href="${ctx}/admin/account/info" target="mainFrame"><i class="icon-user"></i>&nbsp; 个人信息</a></li>
                            <li><a href="${ctx}/admin/account/modifyPwd" target="mainFrame"><i class="icon-lock"></i>&nbsp; 修改密码</a></li>
                        </ul>
                    </li>
                    <li><a href="${ctx}/logout" title="退出登录" data-i18n-text="head.logout">退出</a></li>
                    <li>&nbsp;</li>
                </ul>
            </div><!--/.nav-collapse -->
        </div>
    </div>
    <div class="container-fluid">
        <div id="content" class="row-fluid">
            <div id="left">
                <div class="accordion" id="menu"><c:set var="firstMenu" value="true"/>
                    <div class="accordion-group">
                        <%-- <div class="accordion-heading">
                            <a class="accordion-toggle" data-toggle="collapse" data-parent="#menu" href="#collapse${menu.id}" title="考试管理"><i class="icon-chevron-${firstMenu?'down':'right'}"></i>&nbsp;考试管理</a>
                        </div> --%>
                        <div id="collapse1" class="accordion-body collapse ${firstMenu?'in':''}">
                            <div class="accordion-inner">
                                <ul class="nav nav-list">
                                <c:forEach items="${privileges}" var="privilege">
                                <c:if test="${fnx:hasPrivilegeCode(role_privilege_codes, privilege.code)}">
                                	<c:if test="${privilege.code=='exam_score'}">
	                                	<c:if test="${web_user.schoolAdmin==true || forbiddenScore==false}">
	                                		<li><a href="${ctx}${privilege.privilegeUri}?privilegeCode=${privilege.code}" target="mainFrame"><i class="${privilege.icon}"></i><span data-i18n-text="${privilege.i18n}">${privilege.name}</span></a></li>
	                                	</c:if>
                                	</c:if>
                                	<c:if test="${privilege.code!='exam_score'}">
                                		<li><a href="${ctx}${privilege.privilegeUri}?privilegeCode=${privilege.code}" target="mainFrame"><i class="${privilege.icon}"></i><span data-i18n-text="${privilege.i18n}">${privilege.name}</span></a></li>
                                	</c:if>
                                </c:if>
                                </c:forEach>
                                <%-- 
                                    <c:if test="${web_user.schoolAdmin==true}">
                                        <li><a href="${ctx}/admin/user/list" target="mainFrame"><i class="icon-user"></i><span data-i18n-text="index.user">用户管理</span></a></li>
                                        <li><a href="${ctx}/admin/exam/list" target="mainFrame"><i class="icon-th-list"></i><span data-i18n-text="index.exam">考试管理</span></a></li>
                                        <li><a href="${ctx}/admin/exam/student" target="mainFrame"><i class="icon-user"></i><span data-i18n-text="index.student">考生管理</span></a></li>
                                        <li><a href="${ctx}/admin/exam/paper" target="mainFrame"><i class="icon-book"></i><span data-i18n-text="index.paper">科目管理</span></a></li>
                                        <li><a href="${ctx}/admin/exam/scan" target="mainFrame"><i class="icon-print"></i><span data-i18n-text="index.scan">扫描进度</span></a></li>
                                        <li><a href="${ctx}/admin/exam/mark" target="mainFrame"><i class="icon-pencil"></i><span data-i18n-text="index.mark">评卷管理</span></a></li>
                                        <li><a href="${ctx}/admin/exam/reject/list" target="mainFrame"><i class="icon-bookmark"></i><span data-i18n-text="index.reject">打回试卷</span></a></li>
                                        <li><a href="${ctx}/admin/exam/problem/history" target="mainFrame"><i class="icon-tag"></i><span data-i18n-text="index.problem">问题试卷</span></a></li>
                                        <li><a href="${ctx}/admin/exam/inspected/info" target="mainFrame"><i class="icon-flag"></i><span data-i18n-text="index.inspected">成绩复核</span></a></li>
                                        <li><a href="${ctx}/admin/exam/score" target="mainFrame"><i class="icon-search"></i><span data-i18n-text="index.score">成绩查询</span></a></li>
                                        <li><a href="${ctx}/admin/exam/reportSubject" target="mainFrame"><i class="icon-signal"></i><span data-i18n-text="index.report.total">总量分析</span></a></li>
                                        <li><a href="${ctx}/admin/exam/reportSubjectRange" target="mainFrame"><i class="icon-asterisk"></i><span data-i18n-text="index.report.subject">科目分析</span></a></li>
                                        <li><a href="${ctx}/admin/exam/check/answer" target="mainFrame"><i class="icon-check"></i><span data-i18n-text="index.check">数据检查</span></a></li>
                                        <li><a href="${ctx}/admin/operation/log" target="mainFrame"><i class="icon-tasks"></i><span data-i18n-text="index.log">操作日志</span></a></li>
                                    </c:if>
                                    
                                    <c:if test="${web_user.subjectHeader==true}">
                                        <li><a href="${ctx}/admin/exam/mark" target="mainFrame"><i class="icon-pencil"></i><span data-i18n-text="index.mark">评卷管理</span></a></li>
                                        <li><a href="${ctx}/admin/exam/reject/list" target="mainFrame"><i class="icon-bookmark"></i><span data-i18n-text="index.reject">打回试卷</span></a></li>
                                        <li><a href="${ctx}/admin/exam/problem/history" target="mainFrame"><i class="icon-tag"></i><span data-i18n-text="index.problem">问题试卷</span></a></li>
                                        <li><a href="${ctx}/admin/exam/inspected/info" target="mainFrame"><i class="icon-flag"></i><span data-i18n-text="index.inspected">成绩复核</span></a></li>
                                        <c:if test="${forbiddenScore!=true}">
                                        <li><a href="${ctx}/admin/exam/score" target="mainFrame"><i class="icon-search"></i><span data-i18n-text="index.score">成绩查询</span></a></li>
                                        </c:if>
                                        <li><a href="${ctx}/admin/exam/reportSubject" target="mainFrame"><i class="icon-signal"></i><span data-i18n-text="index.report.total">总量分析</span></a></li>
                                        <li><a href="${ctx}/admin/exam/reportSubjectRange" target="mainFrame"><i class="icon-asterisk"></i><span data-i18n-text="index.report.subject">科目分析</span></a></li>
                                    </c:if>
                                    
                                    <c:if test="${web_user.inspector==true}">
                                        <li><a href="${ctx}/admin/exam/inspected/info" target="mainFrame"><i class="icon-flag"></i><span data-i18n-text="index.inspected">成绩复核</span></a></li>
                                    </c:if>
                                    
                                    <c:if test="${web_user.schoolViewer==true}">
                                        <li><a href="${ctx}/admin/exam/score" target="mainFrame"><i class="icon-search"></i><span data-i18n-text="index.score">成绩查询</span></a></li>
                                    	<li><a href="${ctx}/admin/exam/reportSubject" target="mainFrame"><i class="icon-signal"></i><span data-i18n-text="index.report.total">总量分析</span></a></li>
                                      	<li><a href="${ctx}/admin/operation/log" target="mainFrame"><i class="icon-tasks"></i><span data-i18n-text="index.log">操作日志</span></a></li>
                                    </c:if> --%>
                                    
                                    <c:set var="firstMenu" value="false"/>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="openClose" class="close">&nbsp;</div>
            <div id="right">
                <iframe id="mainFrame" name="mainFrame" src="" style="overflow:auto;"
                        scrolling="yes" frameborder="no" width="100%" height="650"></iframe>
            </div>
            <%-- 			    <%@include file="/WEB-INF/views/include/picConfig.jsp" %> --%>
        </div>
        <div id="footer" class="row-fluid">
            <a target="_blank">v${versionName} beta${versionDate}</a>
        </div>
    </div>
</div>
<script type="text/javascript">
    var leftWidth = "160"; // 左侧窗口大小
    function wSize() {
        var minHeight = 500, minWidth = 980;
        var strs = getWindowSize().toString().split(",");
        $("#menuFrame, #mainFrame, #openClose").height((strs[0] < minHeight ? minHeight : strs[0]) - $("#header").height() - $("#footer").height() - 32);
        $("#openClose").height($("#openClose").height() - 5);
        if (strs[1] < minWidth) {
            $("#main").css("width", minWidth - 10);
            $("html,body").css({"overflow": "auto", "overflow-x": "auto", "overflow-y": "auto"});
        } else {
            $("#main").css("width", "auto");
            $("html,body").css({"overflow": "hidden", "overflow-x": "hidden", "overflow-y": "hidden"});
        }
        $("#right").width($("#content").width() - $("#left").width() - $("#openClose").width() - 5);
    }
   
    $('#exam-select').click(function(){
    	window.location="${ctx}/admin/exam/select";
	});
</script>
<script src="${ctxStatic}/common/wsize.min.js" type="text/javascript"></script>
</body>
</html>