<!DOCTYPE html>
<html lang="<@t.page 'html_lang'/>">
<head>
    <meta charset="utf-8">
    <title>${site.name} - <@t.page 'management_system'/></title>
    <meta name="viewport" content="width=device-width,initial-scale=0.6">
    <link href="${base}/resource/codemirror/lib/codemirror.css" rel="stylesheet" >
    <link href="${base}/resource/codemirror/addon/hint/show-hint.css" rel="stylesheet" >
    <link href="${base}/resource/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!--[if IE 7]>
    <link href="${base}/resource/font-awesome/css/font-awesome-ie7.min.css" rel="stylesheet" >
    <![endif]-->
    <link href="${base}/resource/themes/css/core.css?version=6" rel="stylesheet" media="screen"/>
    <link href="${base}/resource/themes/css/print.css" rel="stylesheet" media="print"/>
    <link href="${base}/resource/themes/css/cms.css" rel="stylesheet" media="screen"/>
    <!--[if lte IE 9]>
        <link href="${base}/resource/themes/css/ieHack.css" rel="stylesheet" media="screen"/>
        <script src="${base}/resource/js/html5shiv.min.js"></script>
        <script src="${base}/resource/js/respond.min.js"></script>
    <![endif]-->
    <script src="${base}/resource/js/echarts.common.min.js"></script>
</head>
<body>
<header>
    <a class="logo" href="./"><img src="<#if siteAttribute.logo?has_content>${site.sitePath+siteAttribute.logo}<#else>${base}/resource/logo.png</#if>" alt="LOGO"/></a>
    <ul class="nav">
        <li><a href="${site.dynamicPath!}" target="_blank"><i class="icon-home icon-large"></i></a></li>
    <#if site.useStatic>
        <li><a href="${site.sitePath!}" target="_blank"><@t.page 'website'/></a></li>
    </#if>
    <@_sysAuthorized roleIds=admin.roles url='clearCache'>
        <li>
            <a href="clearCache" target="ajaxTodo" title="<@t.page 'button.clear_cache'/>"><i class="icon-rubbish icon-large"></i> </a>
        </li>
    </@_sysAuthorized>
        <li>
            <a href="javascript:"><i class="icon-user icon-large"></i> ${(admin.nickName)!}</a>
        </li>
        <li>
            <a href="logout?userId=${admin.id}" title="<@t.page 'logout'/>"><i class="icon-signout icon-large"></i> </a>
        </li>
    </ul>
    <ul id="navMenu">
        <li>
            <a href="javascript:;" onclick="return false;" class="toggleCollapse"><i class="icon icon-chevron-sign-left icon-large"></i></a>
        </li>
<@_sysModuleList>
    <#list page.list as a>
        <@t.merge 'moduleIds' a.id!/>
    </#list>
    <@_sysRoleModule roleIds=admin.roles moduleIds=t.moduleIds!><#assign roleModuleMap=map!/></@_sysRoleModule>

    <#list page.list as a>
        <#if (roleModuleMap[a.id?string])??&&roleModuleMap[a.id?string]>
            <#if !parentId?has_content><#assign parentId=a.id/></#if>
            <li>
                <a href="${a.url?has_content?then(a.url,'menus.html?parentId='+a.id)}" parentId="${a.id}"><#if (a.attached)?has_content><i class="${a.attached} icon-large"></i></#if> <@t.menu a.id/></a>
            </li>
        </#if>
    </#list>
</@_sysModuleList>
<@_masterSite>
    <@_sysAuthorized roleIds=admin.roles url='sysSite/menu'>
        <li>
            <a href="sysSite/menu.html" parentId="site"><i class="icon-sitemap icon-large"></i> <@t.menu 'site'/></a>
        </li>
    </@_sysAuthorized>
</@_masterSite>
    </ul>
</header>
<main>
    <div id="leftside">
        <div id="sidebar_s"><i class="icon-caret-right"></i></div>
        <div id="sidebar">
            <div id="menu">
                <#include "menus.html"/>
            </div>
        </div>
    </div>
    <div id="navTab" class="tabsPage">
        <div class="tabsPageHeader">
            <div class="tabsPageHeaderContent">
                <ul class="navTab-tab">
                    <li tabid="main" class="main" url="main.html"><a href="javascript:;" onclick="return false;"><i class="icon-home icon-large"></i> <@t.page 'workgin_table'/></a></li>
                </ul>
            </div>
            <a href="javascript:;" onclick="return false;" class="tabsLeft"><i class="icon-backward icon-large"></i></a>
            <a href="javascript:;" onclick="return false;" class="tabsRight"><i class="icon-forward icon-large"></i></a>
            <a href="javascript:;" onclick="return false;" class="tabsMore"><i class="icon-th-list icon-large"></i></a>
        </div>
        <ul class="tabsMoreList">
            <li><a href="javascript:;" onclick="return false;"><i class="icon-home icon-large"></i> <@t.page 'workgin_table'/></a></li>
        </ul>
        <div class="navTab-panel tabsPageContent layoutBox">
            <div class="page unitBox work-bench">
                <#include "main.html"/>
            </div>
        </div>
    </div>
</main>
<footer>
   <ul class="langList">
    <#list langs as k,v>
        <li<#if springMacroRequestContext.getMessage('page.lang')=k> class="current-lang"</#if>>
            <a href="changeLocale?lang=${k}" target="ajaxTodo">
                <img src="${base}/resource/themes/images/${k}.png" alt="${v}"/>${v}
            </a>
        </li>
    </#list>
    </ul>
    Copyright &copy; ${.now?string('yyyy')}
    <ul class="themeList" id="themeList">
        <li theme="toptry"><div></div></li>
        <li theme="red"><div></div></li>
    </ul>
</footer>
<script src="${base}/resource/js/jquery-1.12.4.min.js"></script>
<script src="${base}/resource/js/jquery.cookie.js"></script>
<script src="${base}/resource/js/jquery.validate.js"></script>
<script src="${base}/resource/js/jquery.bgiframe.js"></script>
<script src="${base}/resource/js/base64.js"></script>
<script src="${base}/resource/js/dwz.min.js?version=6"></script>
<script src="${base}/resource/js/dwz.plugins.js?version=6"></script>
<script src="${base}/resource/js/<@t.page 'dwz_regional_js'/>?version=2"></script>
<script src="${base}/resource/js/cms.js"></script>
<script>
    var base="${base+adminContextPath}";
    window.UEDITOR_HOME_URL="${site.dynamicPath}resource/ueditor/";
    window.CKEDITOR_BASEPATH="${site.dynamicPath}resource/ckeditor/";
    window.CKEDITOR_LANGUAGE="<@t.page 'ckeditor.lang'/>";
    window.KINDEDITOR_OPTIONS= {
            width:'60%',
            height:'400px',
            basePath:'${site.dynamicPath}resource/kindeditor/',
            uploadJson : '${base+adminContextPath}/kindeditor/upload',
            fileManagerJson : '${base+adminContextPath}/cmsWebFile/fileList.html',
            allowFileManager : true,
            formatUploadUrl : false
    };
    window.editor = {
        ckeditorResources: ["${base}/resource/ckeditor/ckeditor.js"],
        ueditorResources: ["${base}/resource/ueditor/ueditor.config.js","${base}/resource/ueditor/ueditor.all.min.js","${base}/resource/ueditor/lang/<@t.page 'ueditor.lang_js'/>"],
        kindeditorResources: ["${base}/resource/kindeditor/kindeditor-all-min.js","${base}/resource/kindeditor/<@t.page 'kindeditor.lang_js'/>"],
        ckeditorInitd: false,
        ueditorInitd: false,
        kindeditorInitd: false,
        index: 0
    };
    window.codemirror = {
        resources: ['${base}/resource/codemirror/lib/codemirror.js','${base}/resource/codemirror/mode/xml/xml.js','${base}/resource/codemirror/mode/javascript/javascript.js','${base}/resource/codemirror/mode/css/css.js',
            '${base}/resource/codemirror/mode/htmlmixed/htmlmixed.js','${base}/resource/codemirror/mode/freemarker/freemarker.js','${base}/resource/codemirror/mode/freemarkermixed/freemarkermixed.js',
            '${base}/resource/codemirror/mode/nginx/nginx.js','${base}/resource/codemirror/addon/hint/show-hint.js','${base}/resource/codemirror/addon/hint/javascript-hint.js','${base}/resource/codemirror/addon/hint/html-hint.js',
            '${base}/resource/codemirror/addon/hint/css-hint.js','${base}/resource/codemirror/addon/hint/xml-hint.js'],
        initd: false,
        index: 0
    };
    DWZ.init("${base+adminContextPath}/common/dwz.frag.html", {
        loginUrl:"login_dialog.html", loginTitle:"<@t.page 'login'/>",
        pageInfo:{pageNum:"pageNum", numPerPage:"numPerPage", orderField:"orderField", orderDirection:"orderType"},
        debug:false,
        callback:function(){
            initEnv();
            $("#themeList").theme({themeBase:"${base}/resource/themes",defaultTheme:"toptry"});
    <@_sysAuthorized roleIds=admin.roles url='changePassword'>
        <#if admin.weakPassword>
            $.pdialog.open("myself/password.html?target=dialog", "login", "<@t.page 'user.new_password'/>", {mask: true, width: 410, height: 280});
        </#if>
    </@_sysAuthorized>
            $('#navMenu li a[parentId=${parentId!0}]').parent().addClass("selected");
        }
    });
</script>
</body>
</html>