template_add.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>模板管理</title>
  7. </head>
  8. <body layout:fragment="content">
  9. <article class="page-container">
  10. <form class="form form-horizontal" id="form-template-add">
  11. <input type="hidden" id="typeId" th:value="${typeId}" th:name="tid"/>
  12. <div class="row cl">
  13. <label class="form-label col-xs-4 col-sm-2">模板类别:</label>
  14. <div class="formControls col-xs-8 col-sm-9">
  15. <span class="select-box">
  16. <select th:id="typeList" class="select" required th:name="type_id" onchange="reloadTemplateList(0);">
  17. <option th:each="item : ${typeList}" th:value="${item.id}"
  18. th:text="${item.name}" th:selected="${item.id}==${type_id}">
  19. </select>
  20. </span>
  21. </div>
  22. </div>
  23. <div class="row cl">
  24. <label class="form-label col-xs-4 col-sm-2">模板类型:</label>
  25. <div class="formControls col-xs-8 col-sm-9">
  26. <span class="select-box">
  27. <select th:id="itemList" class="select" required th:name="item_id" onchange="reloadTemplateList(1);">
  28. <option th:each="item : ${itemList}" th:value="${item.id}"
  29. th:text="${item.name}" th:selected="${item.id}==${item_id}">
  30. </select>
  31. </span>
  32. </div>
  33. </div>
  34. <div class="row cl">
  35. <div class="pd-15 col-xs-8 col-sm-12">
  36. <span class="l">
  37. <a href="javascript:;" th:onclick="'javascript:template_addFile(\'添加模板文件\',\'/super/template/addFile\',\'800\',\'500\');'" class="btn btn-primary radius">添加模板文件</a>
  38. </span>
  39. </div>
  40. <div class="col-xs-8 col-sm-12">
  41. <table class="table table-border table-bordered table-bg table-hover">
  42. <thead>
  43. <tr class="text-c">
  44. <th>序号</th>
  45. <th>模板名称</th>
  46. <th>模板文件</th>
  47. <th>有效标记</th>
  48. <th>创建时间</th>
  49. <th width="100">操作</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
  54. <td><input type="hidden" th:id="*{id}" value="" name=""/><span th:text="${iterStat.index+1}" ></span></td>
  55. <td th:text="*{name}"></td>
  56. <td>
  57. <th:block th:unless="${model.fileDown} == null">
  58. <th:block th:unless="${model.fileDown.file_url} == null">
  59. <a th:href="${fileUrl} + ${model.fileDown.file_url}" target="_blank">[[${model.fileDown.file_name}]]</a>
  60. </th:block>
  61. </th:block>
  62. </td>
  63. <td class="td-status">
  64. <span class="label radius" th:if="*{is_active==false}">否</span>
  65. <span class="label radius label-success" th:unless="*{is_active==false}">是</span>
  66. </td>
  67. <td th:text="*{create_time}"></td>
  68. <td class="td-manage">
  69. <a title="编辑" href="javascript:;" th:onclick="'javascript:template_editFile(\'编辑模板文件\',\'/super/template/editFile/'+*{id}+'\',\'800\',\'500\');'" class="ml-5" style="text-decoration:none">编辑</a>
  70. <a title="删除" href="javascript:;" th:onclick="'javascript:template_del(\'/super/template/delete/'+*{id}+'\');'" class="ml-5" style="text-decoration:none">删除</a>
  71. </td>
  72. </tr>
  73. </tbody>
  74. </table>
  75. </div>
  76. </div>
  77. <!-- <div class="row cl">
  78. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  79. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>新增</button>
  80. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>
  81. </div>
  82. </div> -->
  83. </form>
  84. </article>
  85. <script type="text/javascript" th:src="@{/js/super/template/template_add.js}"></script>
  86. <script th:inline="javascript">
  87. /**
  88. * 取消
  89. */
  90. function removeIframe() {
  91. var index = parent.layer.getFrameIndex(window.name);
  92. parent.layer.close(index);
  93. }
  94. </script>
  95. </body>
  96. </html>