<div class="panel-sidebar">
        <div class="panel-title">
            <div class="title-bar">
                <h2>欢迎页</h2>
            </div>
        </div>
        <div class="scrollbar-auto">
            <div class="nav-box">
                <ul class="nav-list list-unstyled">
                    <% compilationList.forEach(function (compilation){ %>
                    <li <% if(selectedCompilation._id.toString() === compilation._id.toString()) { %>class="active"<% } %>><a href="/welcome?id=<%= compilation._id %>"><span class="title"><%= compilation.name %></span><% if (!compilation.is_release) { %><span class="text-muted">（未发布）</span><% } %></a></li>
                    <% }) %>
                    <!--<li class=""><a><span class="title">重庆222222定额2018</span><span class="text-muted">（关闭）</span></a></li>
                    <li class="active"><a><span class="title">广东定额</span><span class="text-muted"></span></a></li>-->
                </ul>
            </div>
        </div>
    </div>
<div class="panel-content">
        <div class="panel-title">
            <div class="title-main">
                <h2> <%= selectedCompilation.name %>
                    <a href="javascript:void(0);"  class="btn btn-primary btn-sm pull-right" id="welcome_save">保存</a>
                    <button  class="btn btn-success btn-sm pull-right" id="review">预览</button></h2>
            </div>
        </div>
            <div class="content-wrap">
                <div class="c-header" style="padding:0" >
                  <ul class="nav nav-tabs">
                    <li role="presentation" <% if( type != "professional") { %>class="active"<% } %> ><a href="/welcome?id=<%= selectedCompilation._id.toString()%>">免费版</a></li>
                    <li role="presentation" <% if( type == "professional") { %>class="active"<% } %>><a href="/welcome?id=<%= selectedCompilation._id.toString()%>&type=professional">专业版</a></li>
                  </ul>
                </div>
                <div class="c-body">
                    <form method="post" action="/welcome/save" enctype="application/x-www-form-urlencoded21">
                        <input type="hidden" name="ID" value="<%= settingID%>">
                        <input type="hidden" name="compilationId" value="<%= selectedCompilation._id.toString()%>">
                        <input type="hidden" name="type" value="<%= type%>">
                    <div class="form-group">
                        <label for="title">显示频率</label>
                        <div class="radio">
                            <label>
                                <input type="radio" name="showType" value="1"  <% if(setting.showType == 1) { %>checked<% } %> > 每天显示1次
                            </label>&nbsp;
                            <label>
                                <input type="radio" name="showType" value="2" <% if(setting.showType == 2) { %>checked<% } %> > 每次登录显示
                            </label>&nbsp;
                            <label>
                                <input type="radio" name="showType" value="0" <% if(setting.showType == 0) { %>checked<% } %> > 关闭
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="title">内容</label>
                        <textarea  id="editor" name="context" class="form-control"><%= setting.context %></textarea>
                    </div>
                    </form>
                </div>
            </div>
    </div>

<!-- 预览-->
<div class="modal fade" id="view" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document" style="width:800px">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">预览欢迎页</h5>
            </div>
            <div class="modal-body" >
                <div style="margin:1px;height:400px;overflow-y: auto ;" id="reviewBody">
                    <%- setting.context %>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<!--代码编辑器-->
<script src="/web/users/js/codemirror.js"></script>
<link rel="stylesheet" href="/web/users/css/codemirror.css">
<script src="/web/users/js/xml.js"></script>
<link rel="stylesheet" href="/web/users/css/material.css">

<script type="text/javascript" src="/web/users/js/welcome.js"></script>


<script>


</script>