人人商城

article-display.html 4.8KB

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