人人商城

manage-users.tpl.php 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('account/account-header', TEMPLATE_INCLUDEPATH)) : (include template('account/account-header', TEMPLATE_INCLUDEPATH));?>
  3. <div class="alert alert-info hidden">
  4. <p><i class="fa fa-exclamation-circle"></i> 无主管理员时,创始人为默认主管理员;</p>
  5. <p><i class="fa fa-exclamation-circle"></i> 主管理员拥有公众号的所有权限,并且公众号的权限(模块、模板)根据主管理员来获取;</p>
  6. <p><i class="fa fa-exclamation-circle"></i> 操作员和管理员不允许删除公众号和编辑公众号资料;</p>
  7. <p><i class="fa fa-exclamation-circle"></i> 管理员可以管理操作员;</p>
  8. </div>
  9. <div id="js-account-manage-users" ng-controller="AccountManageUsers" ng-cloak>
  10. <table class="table we7-table table-manage-user">
  11. <col width="230px" />
  12. <col />
  13. <col />
  14. <tr>
  15. <th>权限</th>
  16. <th class="text-left">用户名</th>
  17. <th class="text-right">
  18. <span class="btn btn-link color-default" data-toggle="modal" data-target="#user-modal">添加使用者</span>
  19. </th>
  20. </tr>
  21. <tr ng-if="vice_founder">
  22. <td>副创始人</td>
  23. <td class="text-left" ng-bind="vice_founder.username"></td>
  24. <td class="we7-padding-right text-right link-group">
  25. <?php if(permission_check_account_user('see_account_manage_users_edit_vicefounder')) { ?>
  26. <a href="javascript:;" ng-click="changeVice(vice_founder.username)">修改</a>
  27. <a href="javascript:;" ng-click="delPermission(vice_founder.uid)">删除</a>
  28. <?php } ?>
  29. </td>
  30. </tr>
  31. <tr>
  32. <td>主管理员</td>
  33. <td class="text-left" ng-bind="owner.username" ng-if="owner"></td>
  34. <td class="text-left" ng-bind="vice_founder.username" ng-if="!owner && vice_founder"></td>
  35. <td class="text-left" ng-if="!owner && !vice_founder"><?php echo $founder_info;?></td>
  36. <td class="we7-padding-right text-right link-group">
  37. <?php if(permission_check_account_user('see_account_manage_users_edit_owner')) { ?>
  38. <a href="javascript:;" ng-click="changeOwner(owner.username)">修改</a>
  39. <a href="javascript:;" ng-click="delPermission(owner.uid)" ng-if="owner" class="hidden">删除</a>
  40. <?php } ?>
  41. </td>
  42. </tr>
  43. <tr ng-repeat="(key, item) in manager" ng-if="manager">
  44. <td ng-if="key == 0" rowspan="{{manager.length}}">管理员</td>
  45. <td class="text-left" ng-bind="item.username"></td>
  46. <td class="we7-padding-right text-right link-group">
  47. <?php if(permission_check_account_user('see_account_manage_users_set_permission_for_manager')) { ?>
  48. <a href="javascript:;" ng-click="setPermission(item.uid)">权限设置</a>
  49. <?php } ?>
  50. <?php if(permission_check_account_user('see_account_manage_users_delmanager')) { ?>
  51. <a href="javascript:;" ng-click="delPermission(item.uid)">删除</a>
  52. <?php } ?>
  53. </td>
  54. </tr>
  55. <tr ng-repeat="(key, item) in operator" ng-if="operator">
  56. <td ng-if="key == 0" rowspan="{{operator.length}}">操作员</td>
  57. <td class="text-left" ng-bind="item.username"></td>
  58. <td class="we7-padding-right text-right link-group">
  59. <?php if(permission_check_account_user('see_account_manage_users_set_permission_for_operator')) { ?>
  60. <a href="javascript:;" ng-click="setPermission(item.uid)">权限设置</a>
  61. <?php } ?>
  62. <?php if(permission_check_account_user('see_account_manage_users_deloperator')) { ?>
  63. <a href="javascript:;" ng-click="delPermission(item.uid)">删除</a>
  64. <?php } ?>
  65. </td>
  66. </tr>
  67. </table>
  68. <!-- 添加主管理员模态框 -->
  69. <div class="modal" id="owner-modal">
  70. <div class="modal-dialog">
  71. <div class="modal-content">
  72. <div class="modal-header">
  73. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  74. <h3 class="modal-title">修改账号主管理员</h3>
  75. </div>
  76. <div class="modal-body we7-form">
  77. <div class="form-group">
  78. <label class="col-sm-2 control-label">用户名</label>
  79. <div class="col-sm-10">
  80. <input id="add-owner-username" type="text" class="form-control">
  81. <span class="help-block">请输入完整的用户名。</span>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="modal-footer">
  86. <button type="button" class="btn btn-primary" ng-click="addOwner()">确认</button>
  87. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- 添加账号操作员/管理模态框 -->
  93. <div class="modal" id="user-modal">
  94. <div class="modal-dialog">
  95. <div class="modal-content">
  96. <div class="modal-header">
  97. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  98. <h3 class="modal-title">添加账号操作员/管理员/副创始人</h3>
  99. </div>
  100. <div class="modal-body we7-form">
  101. <div class="form-group" ng-show="state == 'founder' || state == 'owner' || state == 'vice_founder'">
  102. <label class="control-label col-sm-2"></label>
  103. <div class="col-sm-10">
  104. <input class="addtype" type="radio" id="addtype-1" name="addtype" value="<?php echo ACCOUNT_MANAGE_TYPE_OPERATOR;?>" checked>
  105. <label for="addtype-1" class="radio-inline">操作员</label>
  106. <input class="addtype" type="radio" id="addtype-2" name="addtype" value="<?php echo ACCOUNT_MANAGE_TYPE_MANAGER;?>">
  107. <label class="radio-inline" for="addtype-2">管理员</label>
  108. <?php if(permission_check_account_user('see_account_manage_users_add_viceuser')) { ?>
  109. <input class="addtype" type="radio" id="addtype-4" name="addtype" value="<?php echo ACCOUNT_MANAGE_TYPE_VICE_FOUNDER;?>">
  110. <label class="radio-inline" for="addtype-4">副创始人</label>
  111. <?php } ?>
  112. <?php if(permission_check_account_user('see_account_manage_users_adduser')) { ?><a style="float: right" class="color-default" target = '_blank' href="<?php echo url('user/create');?>">+添加用户</a><?php } ?>
  113. </div>
  114. </div>
  115. <div class="form-group">
  116. <label class="col-sm-2 control-label">用户名</label>
  117. <div class="col-sm-10">
  118. <input id="add-username" type="text" class="form-control">
  119. <span class="help-block">请输入完整的用户名。</span>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="modal-footer">
  124. <button type="button" class="btn btn-primary" ng-click="addUsername()">确认</button>
  125. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <script>
  132. angular.module('accountApp').value('config', {
  133. vice_founder: <?php echo !empty($vice_founder) ? json_encode($vice_founder) : 'null'?>,
  134. owner: <?php echo !empty($owner) ? json_encode($owner) : 'null'?>,
  135. manager: <?php echo !empty($manager) ? json_encode($manager) : 'null'?>,
  136. operator: <?php echo !empty($operator) ? json_encode($operator) : 'null'?>,
  137. state: <?php echo !empty($state) ? json_encode($state) : 'null'?>,
  138. accountType: <?php echo !empty($_GPC['account_type']) ? json_encode($_GPC['account_type']) : '1'?>,
  139. links: {
  140. delete: "<?php echo url('account/post-user/delete', array('acid' => $acid, 'uniacid' => $uniacid))?>",
  141. setPermission: "<?php echo url('account/post-user/set_permission', array('acid' => $acid, 'uniacid' => $uniacid));?>",
  142. addUser: "<?php echo url('account/post-user/set_manager', array('acid' => $acid, 'uniacid' => $uniacid))?>"
  143. }
  144. });
  145. angular.bootstrap($('#js-account-manage-users'), ['accountApp']);
  146. </script>
  147. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>