display.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {template 'common/header'}
  2. {template 'user/user-header'}
  3. <div class="keyword-list-head clearfix we7-margin-bottom">
  4. <form action="" method="get">
  5. <input type="hidden" name="c" value="user">
  6. <input type="hidden" name="a" value="display">
  7. <input type="hidden" name="do" value="{$_GPC['do']}">
  8. <input type="hidden" name="type" value="{$_GPC['type']}">
  9. <div class="input-group pull-left col-sm-4">
  10. <input type="text" name="username" id="" value="{$_GPC['username']}" class="form-control" placeholder="搜索用户名" />
  11. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  12. </div>
  13. </form>
  14. <div class="pull-right">
  15. {if $_GPC['type'] == 'display' || $_GPC['type'] == ''}<a href="{url 'user/create'}" class="btn btn-primary">+添加用户</a>{/if}
  16. </div>
  17. </div>
  18. <table class="table we7-table table-hover table-manage vertical-middle" id="js-users-display" ng-controller="UsersDisplay" ng-cloak>
  19. <col width="150px"/>
  20. <col width="150px">
  21. <col width="180px"/>
  22. <col width="140px"/>
  23. <col width="140px"/>
  24. <col width="140px"/>
  25. <col width="160px"/>
  26. <col width="150px"/>
  27. <col width="150px"/>
  28. <tr>
  29. <th></th>
  30. <th class="text-left">用户名</th>
  31. <th>用户权限组</th>
  32. <th>创建公众号</th>
  33. <th>创建小程序</th>
  34. <th>创建pc</th>
  35. <th>创建APP</th>
  36. <th>注册时间</th>
  37. <th>到期时间</th>
  38. <th class="text-right">操作</th>
  39. </tr>
  40. <tr ng-repeat="user in users" ng-if="users">
  41. <td class="td-link">
  42. <a ng-href="{{links.edit}}uid={{user.uid}}">
  43. <img src="{{user.avatar}}" alt="" class="img-responsive icon"/>
  44. </a>
  45. </td>
  46. <td class="text-left" ng-bind="user.username">{$user['username']}</td>
  47. <td>
  48. <span class="color-default" ng-if="user.founder">管理员</span>
  49. <span class="color-default" ng-if="user.groupname && !user.founder" ng-bind="user.groupname"></span>
  50. <span class="color-default" ng-if="!user.groupname && !user.founder">未分配</span>
  51. </td>
  52. <td class="color-default" ng-bind="user.maxaccount"></td>
  53. <td class="color-default" ng-bind="user.maxwxapp"></td>
  54. <td class="color-default" ng-bind="user.maxwebapp"></td>
  55. <td class="color-default" ng-bind="user.maxphoneapp"></td>
  56. <td>
  57. <span ng-bind="user.joindate"></span>
  58. </td>
  59. <td>
  60. <span ng-bind="user.endtime"></span>
  61. </td>
  62. <td class="vertical-middle table-manage-td">
  63. <div class="link-group" ng-if="!user.founder">
  64. <a ng-href="{{links.edit}}uid={{user.uid}}" ng-if="type == 'display' || type == 'clerk'">编辑</a>
  65. <a href="javascript:;" ng-click="operate(user.uid, 'recycle')" ng-if="type == 'display' || type == 'clerk'" data-toggle="tooltip" data-placement="left" title="禁用后可在用户回收站查找到并重新启用。">禁用</a>
  66. <a href="javascript:;" ng-click="operate(user.uid, 'check_pass')" ng-if="type == 'check'">通过</a>
  67. <a href="javascript:;" ng-click="operate(user.uid, 'recycle')" ng-if="type == 'check'" data-toggle="tooltip" data-placement="left" title="拒绝后可在用户回收站查找到并启用。">拒绝</a>
  68. <a href="javascript:;" ng-click="operate(user.uid, 'recycle_restore')" ng-if="type == 'recycle'">启用</a>
  69. <a href="javascript:;" ng-click="operate(user.uid, 'recycle_delete')" class="del" ng-if="type == 'recycle'">删除</a>
  70. </div>
  71. <div class="manage-option text-right" ng-if="!user.founder">
  72. <a href="{{links.edit}}uid={{user.uid}}">基础信息</a>
  73. <a href="{{links.edit}}&do=edit_modules_tpl&uid={{user.uid}}">应用模板权限</a>
  74. <a href="{{links.edit}}&do=edit_account&uid={{user.uid}}">使用账号列表</a>
  75. </div>
  76. </td>
  77. </tr>
  78. <tr ng-if="!users">
  79. <td colspan="7" class="text-center">暂无数据</td>
  80. </tr>
  81. </table>
  82. <div class="text-right">
  83. {$pager}
  84. </div>
  85. <script type="text/javascript">
  86. $(function(){
  87. $('[data-toggle="tooltip"]').tooltip();
  88. });
  89. angular.module('userManageApp').value('config', {
  90. type: "{php echo !empty($_GPC['type']) ? $_GPC['type'] : 'display'}",
  91. users: {php echo !empty($users) ? json_encode($users) : 'null'},
  92. usergroups: {php echo !empty($usergroups) ? json_encode($usergroups) : 'null'},
  93. links: {
  94. link: "{php echo url('user/display/operate')}",
  95. edit: "{php echo url('user/edit')}",
  96. },
  97. });
  98. angular.bootstrap($('#js-users-display'), ['userManageApp']);
  99. </script>
  100. {template 'common/footer'}