index.ejs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <div class="panel-content">
  2. <div class="panel-title fluid">
  3. <div class="title-main d-flex">
  4. <div class="d-inline-block" id="show-level"></div>
  5. </div>
  6. </div>
  7. <div class="content-wrap">
  8. <div class="sjs-height-0" style="background-color: #fff">
  9. <div class="c-body">
  10. <% if (!projectList || projectList.length === 0) { %>
  11. <div class="jumbotron" id="no-project">
  12. <h3 class="display-6">还没有项目数据</h3>
  13. </div>
  14. <% } else { %>
  15. <table class="table table-bordered">
  16. <tr class="text-center">
  17. <th style="min-width: 200px" rowspan="2">项目名称</th>
  18. <th width="10%" rowspan="2">创建时间</th>
  19. <% if (ctx.session.sessionUser.is_admin) { %>
  20. <th width="10%" rowspan="2">操作</th>
  21. <% } %>
  22. </tr>
  23. <tbody id="projectList">
  24. </tbody>
  25. </table>
  26. <% } %>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <script>
  32. const projectList = JSON.parse(unescape('<%- escape(JSON.stringify(projectList)) %>'));
  33. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  34. const is_admin = <%- ctx.session.sessionUser.is_admin %>;
  35. </script>