index.html 12 KB

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