noticeList.zml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. ${zhiqim_manager_content()}
  2. <#-- 导航 -->
  3. <div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
  4. <nav>
  5. <ul>
  6. <li class="z-active">公告管理</li>
  7. </ul>
  8. <div class="z-float-left z-mg10">
  9. <form name="theForm" method="post">
  10. <input name="title" class="z-float-left z-input z-w300 zi-bd-r-none" value="${title}" maxlength="64" placeholder="公告标题">
  11. <select name="status" class="z-float-left z-select z-mg-r-1 zi-bd-r-none" data-role="z-select" data-class="${zmr_color_class}">
  12. <option value="">全部公告状态</option>
  13. <option value="0" <#if status=="0">selected</#if>>草稿</option>
  14. <option value="1" <#if status=="1">selected</#if>>已发布</option>
  15. <option value="2" <#if status=="2">selected</#if>>已下线</option>
  16. </select>
  17. <button class="z-float-left z-button z-w80 zi-bd-rd0 ${zmr_color_class}"><i class="z-font z-query"></i>查询</button>
  18. </form>
  19. </div>
  20. <div class="z-text-right z-mg-t10 z-mg-r5">
  21. <button class="z-button ${zmr_color_class}" onclick="Z.L.href('noticeAdd.htm');"><i class="z-font z-add"></i>增加公告</button>
  22. </div>
  23. </nav>
  24. </div>
  25. <#-- 列表 -->
  26. <table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center">
  27. <tr bgcolor="${zmr_thead_bgcolor}">
  28. <td width="50">选择</td>
  29. <td width="10%">公告状态</td>
  30. <td width="*">文章标题</td>
  31. <td width="10%">创建人</td>
  32. <td width="10%">创建时间</td>
  33. <td width="10%">发布人</td>
  34. <td width="10%">发布时间</td>
  35. <td width="10%">操作</td>
  36. </tr>
  37. ${zhiqim_manager_tr_no_record(noticeList, 5, "暂时没有公告信息")}
  38. <#for item :noticeList.list()>
  39. <tr class="z-h40 z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
  40. <td><input name="noticeId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getId()}"></td>
  41. <td>
  42. <#if item.getStatus()==0><span style="color:violet">草稿</span></#if>
  43. <#if item.getStatus()==1><span style="color:green">已发布</span></#if>
  44. <#if item.getStatus()==2><span style="color:red">已下线</span></#if>
  45. </td>
  46. <td><a title="点击查看详情" href="javascript:getInfo('${item.getId()}');">${item.getTitle()}</a></td>
  47. <td>${item.getAddUser()}</td>
  48. <td>
  49. ${Sqls.toDateTimeString(item.getAddTime())}
  50. </td>
  51. <td>${item.getFinshUser()}</td>
  52. <td>${Sqls.toDateTimeString(item.getFinshTime())}</td>
  53. <td>
  54. <#if item.getStatus()==0>
  55. <button class="z-button ${zmr_color_class}" onclick="doModify('${item.getId()}')"><i class="z-font z-modify"></i>修改</button>
  56. <button class="z-button z-green" onclick="doEnable('${item.getId()}');"><i class="z-font z-open"></i>发布</button>
  57. </#if>
  58. <#if item.getStatus()==1>
  59. <button class="z-button z-red" onclick="doBlockUp('${item.getId()}')"><i class="z-font z-close"></i>下线</button>
  60. </#if>
  61. <!--
  62. <#if item.getStatus()==2>
  63. <button class="z-button z-green" onclick="doEnable('${item.getId()}');"><i class="z-font z-open"></i>发布</button>
  64. </#if>
  65. //-->
  66. </td>
  67. </tr>
  68. </#for>
  69. </table>
  70. ${zhiqim_manager_paging(noticeList, "noticeList.htm")}
  71. <script>
  72. function doEnable(id){
  73. Z.confirm("您确定要启用该公告吗",function(){
  74. var ajax = new Z.Ajax();
  75. ajax.setClassName("DesignerNoticePresenter");
  76. ajax.setMethodName("doEnable");
  77. ajax.addParam(id);
  78. ajax.setFailureAlert();
  79. ajax.setSuccess(function(){
  80. Z.success("操作成功",function(){
  81. parent.location.reload();
  82. parent.Z.Dialog.close();
  83. });
  84. });
  85. ajax.execute();
  86. });
  87. }
  88. function doBlockUp(id){
  89. Z.confirm("您确定要下线该公告吗",function(){
  90. var ajax = new Z.Ajax();
  91. ajax.setClassName("DesignerNoticePresenter");
  92. ajax.setMethodName("doBlockUp");
  93. ajax.addParam(id);
  94. ajax.setFailureAlert();
  95. ajax.setSuccess(function(){
  96. Z.success("操作成功",function(){
  97. parent.location.reload();
  98. parent.Z.Dialog.close();
  99. });
  100. });
  101. ajax.execute();
  102. });
  103. }
  104. function doModify(id){
  105. window.location.href="/noticeModify.htm?noticeId="+id;
  106. }
  107. function getInfo(id){
  108. var dialog = new Z.Dialog();
  109. dialog.title = "公告详情";
  110. dialog.url = "/noticeInfo.htm?id="+id;
  111. dialog.width = 1000;
  112. dialog.height = 746;
  113. dialog.execute();
  114. }
  115. </script>