<div class="main-nav d-flex align-items-start flex-column">
    <div class="logo"><img src="/public/css/logo.png"></div>
    <div class="nav-top">
        <ul class="nav nav-pills nav-stacked bg-nav">
            <% for (const index in ctx.menuList) { %>
            <% if (ctx.menuList[index].display === undefined || !ctx.menuList[index].display) { continue } %>
            <li <% if(ctx.controllerName === index || (ctx.controllerName === 'list' && index === 'tender')) { %>class="active"<% } %>>
                <a href="<%- ctx.menuList[index].url %>" data-toggle="tooltip" data-placement="right" title="" data-original-title="<%- ctx.menuList[index].name %>">
                    <i class="fa <%- ctx.menuList[index].icon %>"></i>
                    <% if (ctx.menuList[index].caption) { %>
                    <span><%- ctx.menuList[index].caption %></span>
                    <% } %>
                </a>
            </li>
            <% } %>
        </ul>
    </div>
    <div class="nav-bottom mt-auto">
        <ul class="nav nav-pills nav-stacked bg-nav">
            <li <% if (ctx.controllerName === 'setting') { %>class="active"<% } %>><a href="/setting/info" data-toggle="tooltip" data-placement="right" title="" data-original-title="项目信息"><i class="fa fa-cogs"></i><span>项目信息</span></a></li>
        </ul>
        <div class="dropright mb-1 ml-1">
            <a href="" class="btn btn-sm btn-light" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">
                <%- ctx.session.sessionUser.name.substr(ctx.session.sessionUser.name.length > 2 ? ctx.session.sessionUser.name.length - 2 : 0) %>
            </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>
</div>
