index.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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('AdminArticle/add')}">添加资讯</a></li>
  8. </ul>
  9. <form class="well form-inline margin-top-20" method="post" action="{:url('AdminArticle/index')}">
  10. 时间:
  11. <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
  12. value="{$start_time|default=''}"
  13. style="width: 140px;" autocomplete="off">-
  14. <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
  15. value="{$end_time|default=''}"
  16. style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
  17. 关键字:
  18. <input type="text" class="form-control" name="keyword" style="width: 200px;"
  19. value="{$keyword|default=''}" placeholder="请输入关键字...">
  20. <input type="submit" class="btn btn-primary" value="搜索"/>
  21. <a class="btn btn-danger" href="{:url('AdminArticle/index')}">清空</a>
  22. </form>
  23. <form class="js-ajax-form" action="" method="post">
  24. <div class="table-actions">
  25. <notempty name="category">
  26. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  27. data-action="{:url('AdminArticle/listOrder')}">{:lang('SORT')}
  28. </button>
  29. </notempty>
  30. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  31. data-action="{:url('AdminArticle/publish',array('yes'=>1))}" data-subcheck="true">发布
  32. </button>
  33. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  34. data-action="{:url('AdminArticle/publish',array('no'=>1))}" data-subcheck="true">取消发布
  35. </button>
  36. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  37. data-action="{:url('AdminArticle/top',array('yes'=>1))}" data-subcheck="true">置顶
  38. </button>
  39. <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
  40. data-action="{:url('AdminArticle/top',array('no'=>1))}" data-subcheck="true">取消置顶
  41. </button>
  42. <!--
  43. <notempty name="category">
  44. <button class="btn btn-primary btn-sm js-articles-move" type="button">批量移动</button>
  45. </notempty>
  46. <button class="btn btn-primary btn-sm js-articles-copy" type="button">批量复制</button>
  47. -->
  48. <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
  49. data-action="{:url('AdminArticle/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
  50. {:lang('DELETE')}
  51. </button>
  52. </div>
  53. <table class="table table-hover table-bordered table-list">
  54. <thead>
  55. <tr>
  56. <th width="15">
  57. <label>
  58. <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
  59. </label>
  60. </th>
  61. <th width="50">ID</th>
  62. <th width="200">标题</th>
  63. <th width="65">点击量</th>
  64. <th width="160">来源/摘要/缩略图</th>
  65. <th width="160">更新时间</th>
  66. <th width="160">发布时间</th>
  67. <th width="70">状态</th>
  68. <th width="95">操作</th>
  69. </tr>
  70. </thead>
  71. <foreach name="articles" item="vo">
  72. <tr>
  73. <td>
  74. <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  75. value="{$vo.id}" title="ID:{$vo.id}">
  76. </td>
  77. <td><b>{$vo.id}</b></td>
  78. <td>
  79. <notempty name="category">
  80. <a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}"
  81. target="_blank">{$vo.post_title}</a>
  82. <else/>
  83. <a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id']))}"
  84. target="_blank">{$vo.post_title}</a>
  85. </notempty>
  86. </td>
  87. <td>{$vo.post_hits|default=0}</td>
  88. <td>
  89. <notempty name="vo.post_source">
  90. <i class="fa fa-check fa-fw"></i>
  91. <else/>
  92. <i class="fa fa-close fa-fw"></i>
  93. </notempty>
  94. <notempty name="vo.post_excerpt">
  95. <i class="fa fa-check fa-fw"></i>
  96. <else/>
  97. <i class="fa fa-close fa-fw"></i>
  98. </notempty>
  99. <notempty name="vo.more.thumbnail">
  100. <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.more.thumbnail)}');">
  101. <i class="fa fa-photo fa-fw"></i>
  102. </a>
  103. <else/>
  104. <i class="fa fa-close fa-fw"></i>
  105. </notempty>
  106. </td>
  107. <td>
  108. <notempty name="vo.update_time">
  109. {:date('Y-m-d H:i',$vo['update_time'])}
  110. </notempty>
  111. </td>
  112. <td>
  113. <empty name="vo.published_time">
  114. 未发布
  115. <else/>
  116. {:date('Y-m-d H:i',$vo['published_time'])}
  117. </empty>
  118. </td>
  119. <td>
  120. <notempty name="vo.post_status">
  121. <a data-toggle="tooltip" title="已发布"><i class="fa fa-check"></i></a>
  122. <else/>
  123. <a data-toggle="tooltip" title="未发布"><i class="fa fa-close"></i></a>
  124. </notempty>
  125. <notempty name="vo.is_top">
  126. <a data-toggle="tooltip" title="已置顶"><i class="fa fa-arrow-up"></i></a>
  127. <else/>
  128. <a data-toggle="tooltip" title="未置顶"><i class="fa fa-arrow-down"></i></a>
  129. </notempty>
  130. </td>
  131. <td>
  132. <a class="btn btn-xs btn-primary" href="{:url('AdminArticle/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
  133. <a class="btn btn-xs btn-danger js-ajax-delete"
  134. href="{:url('AdminArticle/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
  135. </td>
  136. </tr>
  137. </foreach>
  138. </table>
  139. <ul class="pagination">{$page|default=''}</ul>
  140. </form>
  141. </div>
  142. <script src="__STATIC__/js/admin.js"></script>
  143. <script>
  144. function reloadPage(win) {
  145. win.location.reload();
  146. }
  147. $(function () {
  148. setCookie("refersh_time", 0);
  149. Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
  150. //批量复制
  151. $('.js-articles-copy').click(function (e) {
  152. var ids = [];
  153. $("input[name='ids[]']").each(function () {
  154. if ($(this).is(':checked')) {
  155. ids.push($(this).val());
  156. }
  157. });
  158. if (ids.length == 0) {
  159. art.dialog.through({
  160. id: 'error',
  161. icon: 'error',
  162. content: '您没有勾选信息,无法进行操作!',
  163. cancelVal: '关闭',
  164. cancel: true
  165. });
  166. return false;
  167. }
  168. ids = ids.join(',');
  169. art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=copy&ids=" + ids, {
  170. title: "批量复制",
  171. width: "300px"
  172. });
  173. });
  174. //批量移动
  175. $('.js-articles-move').click(function (e) {
  176. var ids = [];
  177. $("input[name='ids[]']").each(function () {
  178. if ($(this).is(':checked')) {
  179. ids.push($(this).val());
  180. }
  181. });
  182. if (ids.length == 0) {
  183. art.dialog.through({
  184. id: 'error',
  185. icon: 'error',
  186. content: '您没有勾选信息,无法进行操作!',
  187. cancelVal: '关闭',
  188. cancel: true
  189. });
  190. return false;
  191. }
  192. ids = ids.join(',');
  193. art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=move&old_term_id={$term.term_id|default=0}&ids=" + ids, {
  194. title: "批量移动",
  195. width: "300px"
  196. });
  197. });
  198. });
  199. });
  200. </script>
  201. </body>
  202. </html>