index.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <#include "../_inc/_layout.html"/>
  2. <#macro script>
  3. function trash(id){
  4. $.get("${CPATH}/admin/content/trash?ucode=${ucode}&id="+id, function(result){
  5. if(result.errorCode > 0){
  6. alert(result.message);
  7. }else{
  8. location.reload();
  9. }
  10. });
  11. }
  12. function batchTrash(){
  13. $("#form").attr("action","${CPATH}/admin/content/batchTrash");
  14. $("#form").ajaxSubmit({
  15. type : "post",
  16. dataType : "json",
  17. success : function(result) {
  18. if(result.errorCode > 0){
  19. alert(result.message);
  20. }else{
  21. location.reload();
  22. }
  23. },
  24. error : function() {
  25. alert("信息提交错误");
  26. }
  27. });
  28. }
  29. function restore(id){
  30. $.get("${CPATH}/admin/content/restore?ucode=${ucode}&id="+id, function(result){
  31. if(result.errorCode > 0){
  32. alert(result.message);
  33. }else{
  34. location.reload();
  35. }
  36. });
  37. }
  38. function del(id){
  39. $.get("${CPATH}/admin/content/delete?ucode=${ucode}&id="+id, function(result){
  40. if(result.errorCode > 0){
  41. alert(result.message);
  42. }else{
  43. location.reload();
  44. }
  45. });
  46. }
  47. </#macro>
  48. <@layout active_id=p child_active_id=c>
  49. <section class="content-header">
  50. <h1>
  51. 所有内容
  52. <a href="${CPATH}/admin/wechat/edit?p=wechat&c=reply" class="btn btn-default btn-sm" > 添加 </a>
  53. </h1>
  54. </section>
  55. <!-- Main content -->
  56. <section class="content">
  57. <div class="row content-row">
  58. <form class="form-horizontal" style="float: right">
  59. <div class="input-group input-group-sm">
  60. <input id="post-search-input" class="form-control" type="search" value="" name="" placeholder="请输入关键词">
  61. <input id="search-submit" class="btn btn-default btn-sm" type="submit" value="搜索">
  62. </div>
  63. </form>
  64. </div>
  65. <div class="box ">
  66. <!-- /.box-header -->
  67. <div class="box-body">
  68. <form action="" method="POST" id="form">
  69. <input type="hidden" name="ucode" value="${ucode}">
  70. <table class="table table-striped">
  71. <thead>
  72. <tr>
  73. <th style="width: 20px"><input name="dataItem" onclick="checkAll(this)" type="checkbox"></th>
  74. <th style="width: 30%">关键字</th>
  75. <th>回复内容</th>
  76. <th style="width: 10%">发布日期</th>
  77. <th style="width: 10%">状态</th>
  78. </tr>
  79. </thead>
  80. <tbody>
  81. <#if page??> <#list page.getList() as bean>
  82. <tr class="jp-onmouse">
  83. <td><input name="dataItem" type="checkbox" value="${bean.id}"></td>
  84. <td><strong><a href="${CPATH}/admin/content/edit?id=${bean.id}&c=edit&p=${p!}">${bean.title}</a></strong>
  85. <div class="jp-flash-comment">
  86. <p class="row-actions jp-cancel-pad">
  87. <span class="approve">
  88. <a class="vim-a" href="${CPATH}/admin/wechat/edit?id=${bean.id}&p=${p!}&c=${c!}">编辑</a>
  89. </span>
  90. <span class="spam">
  91. | <a class="vim-s vim-destructive" href="javascript:trash(${bean.id})">垃圾箱</a>
  92. </span>
  93. </p>
  94. </div></td>
  95. <td>${(bean.text)!}</td>
  96. <td>${(bean.created)!}</td>
  97. <td>${bean.status!}</td>
  98. </tr>
  99. </#list> </#if>
  100. </tbody>
  101. <tfoot>
  102. <tr>
  103. <th style="width: 20px"><input name="dataItem" onclick="checkAll(this)" type="checkbox"></th>
  104. <th style="width: 30%">关键字</th>
  105. <th>回复内容</th>
  106. <th style="width: 10%">发布日期</th>
  107. <th style="width: 10%">状态</th>
  108. </tr>
  109. </tfoot>
  110. </table>
  111. </form>
  112. </div>
  113. <!-- /.box-body -->
  114. </div>
  115. <!-- /.box -->
  116. <!-- /.col -->
  117. <!-- /.row -->
  118. <div class="cf">
  119. <div class="pull-right "><#include "../_inc/_paginate_wrapper.html" /></div>
  120. </div>
  121. </section>
  122. <!-- /.content -->
  123. </@layout>