edit-modules-tpl.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. {template 'common/header'}
  2. <ol class="breadcrumb we7-breadcrumb">
  3. <a href="{url 'user/display'}"><i class="wi wi-back-circle"></i> </a>
  4. <li><a href="{url 'user/display'}">用户管理</a></li>
  5. <li>编辑用户详情</li>
  6. </ol>
  7. <div id="js-user-edit-modulestpl" ng-controller="UserEditModules" ng-cloak>
  8. <div class="user-head-info we7-padding-bottom" >
  9. <img ng-src="{{profile.avatar || ''}}" class="img-circle user-avatar ">
  10. <div class="info">
  11. <h3 class="title" ng-bind="user.username"></h3>
  12. </div>
  13. {if $user['founder_groupid'] != ACCOUNT_MANAGE_GROUP_VICE_FOUNDER}
  14. <a href="javascript:;" class="btn btn-primary" ng-click="recycleUser()">禁用</a>
  15. {/if}
  16. </div>
  17. <div class="btn-group we7-btn-group we7-padding-bottom">
  18. <a href="{php echo url('user/edit/edit_base', array('uid' => $_GPC['uid']))}" class="btn btn-default">基础信息</a>
  19. {if empty($user['founder_groupid'])}
  20. <a href="{php echo url('user/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default active">应用模板权限</a>
  21. {/if}
  22. {if !empty($user['founder_groupid'])}
  23. <a href="{php echo url('founder/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default active">应用模板权限</a>
  24. {/if}
  25. <a href="{php echo url('user/edit/edit_create_account_list', array('uid' => $_GPC['uid']))}" class="btn btn-default">账号创建权限</a>
  26. <a href="{php echo url('user/edit/edit_account_dateline', array('uid' => $_GPC['uid']))}" class="btn btn-default">账号使用期限</a>
  27. {if empty($user['founder_groupid'])}
  28. <a href="{php echo url('user/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  29. {/if}
  30. {if !empty($user['founder_groupid'])}
  31. <a href="{php echo url('founder/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  32. {/if}
  33. </div>
  34. <!-- 所属用户组 start -->
  35. <div class="panel we7-panel user-permission">
  36. <div class="panel-heading">
  37. <span>所属用户组:<span ng-bind="group_info.name || '无用户组'"></span></span>
  38. <span class="pull-right">
  39. <a href="javascript:;" ng-if="user.groupid != 0" class="color-default" ng-click="delUserGroup(group_info.id)">删除</a>
  40. <a href="javascript:;" class="color-default" data-toggle="modal" data-target="#group">修改</a>
  41. </span>
  42. </div>
  43. <div class="modal fade" id="group" role="dialog">
  44. <div class="we7-modal-dialog modal-dialog">
  45. <div class="modal-content">
  46. <div class="modal-header">
  47. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  48. <div class="modal-title">修改用户组</div>
  49. </div>
  50. <div class="modal-body">
  51. <div class="form-group">
  52. <select class="we7-select" ng-model="changeGroup">
  53. <option value="0">请选择所属用户组</option>
  54. <option value="{{group.id}}" ng-repeat="group in groups" ng-selected="group.id == group_info.id" ng-bind="group.name"></option>
  55. </select>
  56. <span class="help-block"></span>
  57. </div>
  58. </div>
  59. <div class="modal-footer">
  60. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('groupid')">确定</button>
  61. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="we7-group-show we7-padding" ng-repeat="(packid, pack) in group_info.package_detail">
  67. <div class="name">
  68. {{pack.id == '-1' ? '所有服务' : pack.name}}
  69. </div>
  70. <div class="group-app-list" ng-if="pack.id != -1">
  71. <div class="group-app-item" ng-repeat="module in pack.modules_all">
  72. <img ng-src="{{module.logo}}" class="module-img" alt="">
  73. <div class="info">
  74. <div class="title text-over">
  75. {{module.title}}
  76. </div>
  77. <div class="type-list">
  78. <i ng-repeat="item in module.group_support | moduleInfo" ng-class="item.icon"></i>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="group-app-item" ng-repeat="module in pack.templates">
  83. <img ng-src="{{module.logo}}" class="template-img" alt="">
  84. <div class="info">
  85. <div class="title">
  86. {{module.title}}
  87. </div>
  88. <div class="type-list">
  89. <i class="wi wi-template"></i>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="group-app-list" ng-if="pack.id == -1">
  95. <div class="group-app-item">所有服务</div>
  96. </div>
  97. <a class="action" ng-if="pack.id != -1"></a>
  98. </div>
  99. <div class="we7-empty-block" ng-if="group_info.package_detail | we7IsEmpty">
  100. 无服务
  101. </div>
  102. </div>
  103. <!-- 所属用户组 end -->
  104. <!-- 应用权限组 start -->
  105. <div class="panel we7-panel user-permission">
  106. <div class="panel-heading">
  107. <span>应用权限组</span>
  108. <we7-modal-app module-list="groupList" multiple="true" on-confirm="selectUniGroup()"><a href="javascript:;" class="pull-right color-default">修改</a></we7-modal-app>
  109. </div>
  110. <div class="we7-group-show we7-padding" ng-repeat="(packid, pack) in user_extra_groups">
  111. <div class="name">
  112. {{pack.name}}
  113. </div>
  114. <div class="group-app-list">
  115. <div class="group-app-item" ng-repeat="module in pack.modules_all">
  116. <img ng-src="{{module.logo}}" class="module-img" alt="">
  117. <div class="info">
  118. <div class="title text-over">
  119. {{module.title}}
  120. </div>
  121. <div class="type-list">
  122. <i ng-repeat="item in module.group_support | moduleInfo" ng-class="item.icon"></i>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="group-app-item" ng-repeat="module in pack.templates">
  127. <img ng-src="{{module.logo}}" class="template-img" alt="">
  128. <div class="info">
  129. <div class="title">
  130. {{module.title}}
  131. </div>
  132. <div class="type-list">
  133. <i class="wi wi-template"></i>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. <a class="action"></a>
  139. </div>
  140. <div class="we7-empty-block" ng-if="!user_extra_groups">
  141. 无应用权限组
  142. </div>
  143. </div>
  144. <!-- 应用权限组 end -->
  145. <!-- 附加权限 start -->
  146. <div class="panel we7-panel user-permission">
  147. <div class="panel-heading">
  148. <span>附加权限</span>
  149. <we7-modal-app module-list="moduleList" multiple="true" on-confirm="selectExtraModules()"><a href="javascript:;" class="pull-right color-default">修改</a></we7-modal-app>
  150. </div>
  151. <div class="we7-group-show we7-padding" ng-if="!(extend.modules | we7IsEmpty)">
  152. <div class="name">
  153. 附加应用
  154. </div>
  155. <div class="group-app-list">
  156. <div class="group-app-item" ng-repeat="module in extend.modules">
  157. <img ng-src="{{module.logo}}" class="module-img" alt="">
  158. <div class="info">
  159. <div class="title text-over">
  160. {{module.title}}
  161. </div>
  162. <div class="type-list">
  163. <i ng-class="module.support | moduleInfo:'icon'" ></i>
  164. </div>
  165. </div>
  166. </div>
  167. <div class="group-app-item" ng-repeat="module in extend.templates">
  168. <img ng-src="{{module.logo}}" class="template-img" alt="">
  169. <div class="info">
  170. <div class="title">
  171. {{module.title}}
  172. </div>
  173. <div class="type-list">
  174. <i class="wi wi-template"></i>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. <a class="action"></a>
  180. </div>
  181. <div class="we7-empty-block" ng-if="extend.modules | we7IsEmpty">
  182. 无应用权限组
  183. </div>
  184. </div>
  185. <!-- 附加权限 end -->
  186. <script type="text/javascript">
  187. angular.module('userManageApp').value('config', {
  188. user: {php echo !empty($user) ? json_encode($user) : 'null'},
  189. uid : {php echo $_GPC['uid']},
  190. profile: {php echo !empty($profile) ? json_encode($profile) : 'null'},
  191. group_info: {php echo !empty($group_info) ? json_encode($group_info) : 'null'},
  192. groups: {php echo !empty($groups) ? json_encode($groups) : 'null'},
  193. extend: {php echo !empty($extend) ? json_encode($extend) : 'null'},
  194. user_modules: {php echo !empty($user_modules) ? json_encode($user_modules) : 'null'},
  195. /* 应用权限 - 应用权限组*/
  196. modules_group_list: {php echo !empty($modules_group_list) ? json_encode($modules_group_list) : 'null'},
  197. source_templates: {php echo !empty($templates) ? json_encode($templates) : 'null'},
  198. extend_modules: {php echo !empty($extend_permission['modules']) ? json_encode($extend_permission['modules']) : 'null'},
  199. uni_groups: {php echo !empty($uni_groups) ? json_encode($uni_groups) : 'null'},
  200. user_extra_groups: {php echo !empty($user_extra_groups) ? json_encode($user_extra_groups) : 'null'},
  201. links: {
  202. editGroup: "{php echo url('user/edit/edit_modules_tpl')}",
  203. editUniGroupsUrl: "{php echo url('user/edit/edit_uni_groups')}",
  204. editExtraModulesUrl: "{php echo url('user/edit/edit_extra_modules')}",
  205. editUsersPermission: "{php echo url('user/edit/edit_users_permission')}",
  206. deleteUserGroupUrl: "{php echo url('user/edit/delete_user_group')}",
  207. recycleUser: "{php echo url('user/display/operate', array('type' => 'recycle'))}",
  208. },
  209. });
  210. angular.bootstrap($('#js-user-edit-modulestpl'), ['userManageApp']);
  211. </script>
  212. {template 'common/footer'}