article-display.html 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. {loop $active_sub_permission $active_menu}
  4. {if permission_check_account_user($active_menu['permission_name'], false) && (empty($active_menu['is_display']) || is_array($active_menu['is_display']) && in_array($_W['account']['type'], $active_menu['is_display']))}
  5. <li {if $action == $active_menu['active']}class="active"{/if}><a href="{$active_menu['url']}">{$active_menu['title']}</a></li>
  6. {/if}
  7. {/loop}
  8. </ul>
  9. <div id="js-wesite-article-display" ng-controller="wesiteArticleDisplay" ng-cloak>
  10. <div class="search-box we7-padding-bottom clearfix">
  11. <div class="pull-right">
  12. </div>
  13. <form action="./index.php" method="get" class="search-form " role="form">
  14. <input type="hidden" name="a" value="article" />
  15. <input type="hidden" name="c" value="site" />
  16. <input type="hidden" name="do" value="display" />
  17. <div class="pull-left">
  18. {php echo tpl_form_field_category_2level('category', $parent, $children, $_GPC['category']['parentid'], $_GPC['category']['childid']);}
  19. </div>
  20. <div class="input-group we7-padding-left ">
  21. <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="请输入标题名">
  22. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  23. </div>
  24. </form>
  25. 是否开启留言功能&nbsp;&nbsp;
  26. <span ng-class="setting.comment_status == 1 ? 'switch switchOn' : 'switch'" ng-click="comment()"></span>
  27. <a href="{php echo url('site/article/post')}" class="btn btn-primary we7-margin-left">+新建文章</a>
  28. </div>
  29. <form action="./index.php?c=site&a=article&do=del" method="post" class="we7-form" role="form">
  30. <table class="table we7-table table-hover article-list vertical-middle ">
  31. <col width="80px">
  32. <col width="70px"/>
  33. <col width=""/>
  34. <col width="120px"/>
  35. <col width="270px"/>
  36. <tr>
  37. <th></th>
  38. <th>排序</th>
  39. <th class="text-left">标题</th>
  40. <th>属性</th>
  41. <th class="text-right">操作</th>
  42. </tr>
  43. <tr ng-if="!articleList">
  44. <td colspan="5" class="text-center">暂无数据</td>
  45. </tr>
  46. <tr ng-repeat="article in articleList" ng-if="articleList">
  47. <td>
  48. <input type="checkbox" we7-check-all="1" name="rid[]" id="rid-{{article.id}}" value="{{article.id}}">
  49. <label for="rid-{{article.id}}">&nbsp;</label>
  50. </td>
  51. <td ng-bind="article.displayorder"></td>
  52. <td class="text-left" ng-bind="article.title"></td>
  53. <td>
  54. <span class="label label-primary" ng-if="article.ishot == 1">头条</span>
  55. <span class="label label-primary" ng-if="article.iscommend == 1">推荐</span>
  56. </td>
  57. <td>
  58. <div class="link-group">
  59. <a class="article-list-reply" ng-if="article.count" ng-href="{{commentListLink}}id={{article.id}}">查看留言</a>
  60. <a ng-if="!article.count" ng-href="{{commentListLink}}id={{article.id}}">查看留言</a>
  61. <a href="javascript:;" id="copy-{{article.id}}" clipboard supported="supported" text="article.link" on-copied="success(article.id)">复制链接</a>
  62. <a href="javascript:;" ng-click="editArticle(article.id)">编辑</a>
  63. <a href="javascript:;" class="del" ng-click="delArticle(article.id)">删除</a>
  64. </div>
  65. </td>
  66. </tr>
  67. </table>
  68. <div class="pull-left we7-margin-left-sm">
  69. <input type="checkbox" we7-check-all="1" name="rid[]" id="select_all" value="1" ng-style="{'margin-left': '30px'}">
  70. <label for="select_all">&nbsp;</label>
  71. <input type="hidden" name="token" value="{$_W['token']}" />
  72. <input type="submit" class="btn btn-danger" name="submit" value="删除" onclick="if(!confirm('确定删除选中的规则吗?')) return false;"/>
  73. </div>
  74. <div class="text-right we7-margin-top">
  75. {$pager}
  76. </div>
  77. </form>
  78. </div>
  79. <script>
  80. $('#select_all').click(function(){
  81. $('.article-list :checkbox').prop('checked', $(this).prop('checked'));
  82. });
  83. angular.module('wesiteApp').value('config', {
  84. category: {php echo !empty($category) ? json_encode($category) : 'null'},
  85. articleList: {php echo !empty($list) ? json_encode($list) : 'null'},
  86. articleComment: {php echo !empty($article_comment) ? json_encode($article_comment) : 'null'},
  87. setting: {php echo !empty($setting) ? json_encode($setting) : 'null'},
  88. copyCommonLink: "{php echo murl('site/site/detail', array('id' => ''), true, true)}",
  89. commentListLink: "{php echo url('site/comment/display')}",
  90. commentLink: "{php echo url('site/comment/change_status')}"
  91. });
  92. angular.bootstrap($('#js-wesite-article-display'), ['wesiteApp']);
  93. </script>
  94. {template 'common/footer'}