<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title><%= ctx.menu.name === undefined ? '主页' : ctx.menu.name %>-计量支付</title>
    <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="/public/css/main.css">
    <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
    <link rel="stylesheet" href="/public/css/spreadjs/sheets/gc.spread.sheets.excel2013lightGray.10.0.1.css">
    <link rel="stylesheet" href="/public/css/jquery-contextmenu/jquery.contextMenu.min.css">
    <!-- JS. -->
    <script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
    <script src="/public/js/jquery/jquery.validate.js"></script>
    <script src="/public/js/messages_zh.js"></script>
    <script src="/public/js/popper/popper.min.js"></script>
    <script src="/public/js/bootstrap/bootstrap.min.js"></script>
    <script src="/public/js/global.js"></script>
    <script src="/public/js/vue/vue.js"></script>
    <script src="/public/js/component/input.js"></script>
    <script src="/public/js/cookies.js"></script>
    <script src="/public/js/jquery-contextmenu/jquery.ui.position.min.js"></script>
    <script src="/public/js/jquery-contextmenu/jquery.contextMenu.min.js"></script>
</head>

<body>
<div class="header">
    <h1 class="logo"><a>主页-纵横变更管理系统</a></h1>
    <% if(ctx.showProject) { %>
    <% include ./project_list.ejs %>
    <% } %>
    <% if(ctx.showTender) { %>
    <% include ./tender_list.ejs %>
    <% } %>
    <% if(ctx.showTitle) { %>
    <div class="poj-name">
        <span class="name"><%= ctx.title %></span>
    </div>
    <% } %>
    <div class="header-box">
        <div class="header-nav"></div>
        <div class="header-user pull-right">
            <div class="avatar btn-group">
                <a class="dropdown-toggle" data-toggle="dropdown">
                    <span class="pic"><img src="/public/images/avatar.png"></span>
                    <span><%= ctx.session.sessionUser.account %></span>
                    <span class="caret"></span>
                </a>
                <div class="dropdown-menu">
                    <a href="/profile/info" class="dropdown-item">账号资料</a>
                    <a href="#" class="dropdown-item">账号安全</a>
                    <div class="dropdown-divider"></div>
                    <a href="#" class="dropdown-item">帮助中心</a>
                    <a href="/logout" class="dropdown-item">退出登录</a>
                </div>
            </div>
            <div class="msg">
                <a>
                    <i class="fa fa-bell"></i><sup>0</sup>
                </a>
            </div>
        </div>
    </div>
</div>
<div class="main">
    <% include ./menu.ejs %>
    <div class="main-panel">
        <%- content %>
    </div>
</div>
<div class="toast">
    <i class="icon fa"></i>
    <span class="message"></span>
</div>
<%- modal %>
<script type="text/javascript">
    let toastInfo = '<%- message %>';
    try {
        toastInfo = toastInfo !== '' && toastInfo !== 'null' ? JSON.parse(toastInfo) : '';
    } catch (error) {
        toastInfo = '';
    }

    if (toastInfo !== '') {
        toast(toastInfo.message, toastInfo.type, toastInfo.icon);
    }
    let user = '<%= ctx.session.sessionUser.name %>';
</script>
</body>

</html>
