index.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="javascript:;">图文列表</a></li>
  7. <li><a href="{:url('Pic/add')}">添加图文</a></li>
  8. </ul>
  9. <form class="well form-inline margin-top-20" method="post" action="{:url('Pic/index')}">
  10. 分类:
  11. <select class="form-control" name="type" style="width: 140px;" value="{$params.type}">
  12. <option value='0'>全部</option>
  13. <option value='1' <if condition="$params.type eq 1">selected</if>>我们恋爱了</option>
  14. <option value='2' <if condition="$params.type eq 2">selected</if>>我们结婚了</option>
  15. <option value='3' <if condition="$params.type eq 3">selected</if>>活动花絮</option>
  16. </select> &nbsp;&nbsp;
  17. 关键字:
  18. <input type="text" class="form-control" name="keyword" style="width: 200px;"
  19. value="{$params.keyword|default=''}" placeholder="请输入关键字...">
  20. <input type="submit" class="btn btn-primary" value="搜索"/>
  21. <a class="btn btn-danger" href="{:url('Pic/index')}">清空</a>
  22. </form>
  23. <form class="js-ajax-form" action="" method="post">
  24. <div class="table-actions">
  25. <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
  26. data-action="{:url('Pic/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
  27. {:lang('DELETE')}
  28. </button>
  29. </div>
  30. <table class="table table-hover table-bordered table-list">
  31. <thead>
  32. <tr>
  33. <th width="15">
  34. <label>
  35. <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
  36. </label>
  37. </th>
  38. <th width="50">ID</th>
  39. <th>标题</th>
  40. <th>分类</th>
  41. <th>作者</th>
  42. <th width="160">描述</th>
  43. <th width="160">添加时间</th>
  44. <th width="160">发布时间</th>
  45. <th width="70">状态</th>
  46. <th width="95">操作</th>
  47. </tr>
  48. </thead>
  49. <foreach name="datas" item="vo">
  50. <tr>
  51. <td>
  52. <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  53. value="{$vo.id}" title="ID:{$vo.id}">
  54. </td>
  55. <td><b>{$vo.id}</b></td>
  56. <td>
  57. {$vo.post_title}
  58. </td>
  59. <td>
  60. <if condition="$vo.type eq 1">
  61. 我们恋爱了
  62. <elseif condition="$vo.type eq 2">
  63. 我们结婚了
  64. <else>
  65. 活动花絮
  66. </if>
  67. </td>
  68. <td>{$vo.user_nickname}</td>
  69. <td>
  70. {$vo.post_excerpt}
  71. </td>
  72. <td>
  73. <notempty name="vo.create_time">
  74. {:date('Y-m-d H:i',$vo['create_time'])}
  75. </notempty>
  76. </td>
  77. <td>
  78. <empty name="vo.published_time">
  79. 未发布
  80. <else/>
  81. {:date('Y-m-d H:i',$vo['published_time'])}
  82. </empty>
  83. </td>
  84. <td>
  85. {$vo.post_status == 1? '显示':'隐藏'}
  86. </td>
  87. <td>
  88. <a class="btn btn-xs btn-primary" href="{:url('Pic/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
  89. <a class="btn btn-xs btn-danger js-ajax-delete"
  90. href="{:url('Pic/delete',array('ids'=>$vo['id']))}">{:lang('DELETE')}</a>
  91. </td>
  92. </tr>
  93. </foreach>
  94. </table>
  95. <ul class="pagination">{$page|default=''}</ul>
  96. </form>
  97. </div>
  98. <script src="__STATIC__/js/admin.js"></script>
  99. <script>
  100. function reloadPage(win) {
  101. win.location.reload();
  102. }
  103. $(function () {
  104. setCookie("refersh_time", 0);
  105. Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
  106. //批量复制
  107. $('.js-articles-copy').click(function (e) {
  108. var ids = [];
  109. $("input[name='ids[]']").each(function () {
  110. if ($(this).is(':checked')) {
  111. ids.push($(this).val());
  112. }
  113. });
  114. if (ids.length == 0) {
  115. art.dialog.through({
  116. id: 'error',
  117. icon: 'error',
  118. content: '您没有勾选信息,无法进行操作!',
  119. cancelVal: '关闭',
  120. cancel: true
  121. });
  122. return false;
  123. }
  124. ids = ids.join(',');
  125. art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=copy&ids=" + ids, {
  126. title: "批量复制",
  127. width: "300px"
  128. });
  129. });
  130. //批量移动
  131. $('.js-articles-move').click(function (e) {
  132. var ids = [];
  133. $("input[name='ids[]']").each(function () {
  134. if ($(this).is(':checked')) {
  135. ids.push($(this).val());
  136. }
  137. });
  138. if (ids.length == 0) {
  139. art.dialog.through({
  140. id: 'error',
  141. icon: 'error',
  142. content: '您没有勾选信息,无法进行操作!',
  143. cancelVal: '关闭',
  144. cancel: true
  145. });
  146. return false;
  147. }
  148. ids = ids.join(',');
  149. art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=move&old_term_id={$term.term_id|default=0}&ids=" + ids, {
  150. title: "批量移动",
  151. width: "300px"
  152. });
  153. });
  154. });
  155. });
  156. </script>
  157. </body>
  158. </html>