index.html 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <div class="panel-sidebar">
  2. <div class="panel-title">
  3. <div class="title-bar">
  4. <h2>欢迎页</h2>
  5. </div>
  6. </div>
  7. <div class="scrollbar-auto">
  8. <div class="nav-box">
  9. <ul class="nav-list list-unstyled">
  10. <% compilationList.forEach(function (compilation){ %>
  11. <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>
  12. <% }) %>
  13. <!--<li class=""><a><span class="title">重庆222222定额2018</span><span class="text-muted">(关闭)</span></a></li>
  14. <li class="active"><a><span class="title">广东定额</span><span class="text-muted"></span></a></li>-->
  15. </ul>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="panel-content">
  20. <div class="panel-title">
  21. <div class="title-main">
  22. <h2> <%= selectedCompilation.name %>
  23. <a href="javascript:void(0);" class="btn btn-primary btn-sm pull-right" id="welcome_save">保存</a>
  24. <button class="btn btn-success btn-sm pull-right" id="review">预览</button></h2>
  25. </div>
  26. </div>
  27. <div class="content-wrap">
  28. <div class="c-header" style="padding:0">
  29. <ul class="nav nav-tabs">
  30. <li role="presentation" <% if( type != "professional") { %>class="active"<% } %> ><a href="/welcome?id=<%= selectedCompilation._id.toString()%>">免费版</a></li>
  31. <li role="presentation" <% if( type == "professional") { %>class="active"<% } %>><a href="/welcome?id=<%= selectedCompilation._id.toString()%>&type=professional">专业版</a></li>
  32. </ul>
  33. </div>
  34. <div class="c-body">
  35. <form method="post" action="/welcome/save" enctype="application/x-www-form-urlencoded21">
  36. <input type="hidden" name="ID" value="<%= settingID%>">
  37. <input type="hidden" name="compilationId" value="<%= selectedCompilation._id.toString()%>">
  38. <input type="hidden" name="type" value="<%= type%>">
  39. <div class="form-group">
  40. <label for="title">显示频率</label>
  41. <div class="radio">
  42. <label>
  43. <input type="radio" name="showType" value="1" <% if(setting.showType == 1) { %>checked<% } %> > 每天显示1次
  44. </label>&nbsp;
  45. <label>
  46. <input type="radio" name="showType" value="2" <% if(setting.showType == 2) { %>checked<% } %> > 每次登录显示
  47. </label>&nbsp;
  48. <label>
  49. <input type="radio" name="showType" value="0" <% if(setting.showType == 0) { %>checked<% } %> > 关闭
  50. </label>&nbsp;
  51. <label>
  52. 显示时间 <input type="number" step="1" name="showTime" value="<%= setting.showTime %>" >
  53. </label>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label for="title">内容</label>
  58. <textarea id="editor" name="context" class="form-control"><%= setting.context %></textarea>
  59. </div>
  60. </form>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- 预览-->
  65. <div class="modal fade" id="view" tabindex="-1" role="dialog">
  66. <div class="modal-dialog modal-lg" role="document" style="width:800px">
  67. <div class="modal-content">
  68. <div class="modal-header">
  69. <h5 class="modal-title">预览欢迎页</h5>
  70. </div>
  71. <div class="modal-body" >
  72. <div style="margin:1px;height:400px;overflow-y: auto ;" id="reviewBody">
  73. <%- setting.context %>
  74. </div>
  75. </div>
  76. <div class="modal-footer">
  77. <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <!--代码编辑器-->
  83. <script src="/web/users/js/codemirror.js"></script>
  84. <link rel="stylesheet" href="/web/users/css/codemirror.css">
  85. <script src="/web/users/js/xml.js"></script>
  86. <link rel="stylesheet" href="/web/users/css/material.css">
  87. <script type="text/javascript" src="/web/users/js/welcome.js"></script>
  88. <script>
  89. </script>