人人商城

manage-modules-tpl.tpl.php 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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 id="js-account-manage-modules-tpl" ng-controller="AccountMangeModulesTpl" ng-cloak>
  4. <div class="alert alert-info">
  5. <p><i class="fa fa-exclamation-circle"></i> 无主管理员时,创始人为默认主管理员,<?php echo $account->typeName?>拥有所有权限</p>
  6. </div>
  7. <?php if(!in_array($owner['uid'], $founders)) { ?>
  8. <table class="table we7-table table-hover" >
  9. <col />
  10. <col />
  11. <col />
  12. <col />
  13. <col />
  14. <col width="120px"/>
  15. <tr>
  16. <th colspan="5" class="text-left">
  17. <span class="we7-padding-right">会员权限组: {{owner.group.name}}</span>
  18. <span></span>
  19. </th>
  20. <?php if($_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER && !in_array($owner['uid'], $founders) || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER && $owner['uid'] != $_W['uid']) { ?>
  21. <th class="text-right"><a href="<?php if($owner['founder_groupid'] == ACCOUNT_MANAGE_GROUP_VICE_FOUNDER) { ?><?php echo url('founder/edit/edit_modules_tpl', array('uid' => $owner['uid']))?><?php } else { ?><?php echo url('user/edit/edit_modules_tpl',array('uid'=>$owner['uid']))?><?php } ?>" class="color-default">修改</a></th>
  22. <?php } else { ?>
  23. <th class="text-right"><a href="" class="color-default"></a></th>
  24. <?php } ?>
  25. </tr>
  26. <tbody ng-repeat="module_tpl in modules_tpl | filter:{'type':'default'}">
  27. <tr>
  28. <td colspan="5" class="text-left we7-padding-right" ng-init="module_tpl.show = true">
  29. <span>{{module_tpl.name}}</span>
  30. </td>
  31. <td>
  32. <div class="link-group">
  33. <a href="javascript:;" class="color-default" ng-show="module_tpl.show" ng-click="module_tpl.show = false">收起</a>
  34. <a href="javascript:;" class="color-default" ng-show="!module_tpl.show" ng-click="module_tpl.show = true">展开</a>
  35. <!--<a href="javascript:;" class="color-default">删除</a>-->
  36. </div>
  37. </td><!--默认展开-->
  38. </tr>
  39. <tr ng-show="module_tpl.show">
  40. <td colspan="5">
  41. <div class="col-sm-1 color-gray text-left we7-padding-none"><?php echo $account->typeName?>应用</div>
  42. <div class="col-sm-11">
  43. <div class="col-sm-3 text-left we7-margin-bottom"
  44. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?> ng-repeat="module in module_tpl.modules"
  45. <?php } else if($account->typeSign == WXAPP_TYPE_SIGN) { ?> ng-repeat="module in module_tpl.wxapp"
  46. <?php } else if($account->typeSign == WEBAPP_TYPE_SIGN) { ?> ng-repeat="module in module_tpl.webapp"
  47. <?php } else if($account->typeSign == PHONEAPP_TYPE_SIGN) { ?> ng-repeat="module in module_tpl.phoneapp"
  48. <?php } else if($account->typeSign == XZAPP_TYPE_SIGN) { ?> ng-repeat="module in module_tpl.xzapp"
  49. <?php } else if($account->typeSign == ALIAPP_TYPE_SIGN) { ?> ng-repeat="module in module_tpl.aliapp"
  50. <?php } ?> >
  51. <div ng-if="module.name != 'all'" class="text-over text-left">
  52. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  53. {{ module.title }}
  54. </div>
  55. <label class="label label-info" ng-if="module.name == 'all'">所有模块</label>
  56. </div>
  57. </div>
  58. </td>
  59. <td class="we7-padding-right color-default"></td>
  60. </tr>
  61. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?>
  62. <tr ng-show="module_tpl.show">
  63. <td colspan="5">
  64. <div class="col-sm-1 color-gray text-left we7-padding-none">模板</div>
  65. <div class="col-sm-11">
  66. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="tpl in module_tpl.templates">
  67. <a href="javascript:;" class="label label-info" ng-bind="tpl.title"></a>
  68. </div>
  69. </div>
  70. </td>
  71. <td class="we7-padding-right color-default"></td>
  72. </tr>
  73. <?php } ?>
  74. </tbody>
  75. </table>
  76. <table class="table we7-table table-hover">
  77. <tr>
  78. <th colspan="5" class="text-left">
  79. <span class="we7-padding-right">应用权限组</span>
  80. <span></span>
  81. </th>
  82. <?php if($_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER && !in_array($owner['uid'], $founders) || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER && $owner['uid'] != $_W['uid']) { ?>
  83. <th class="text-right"><a class="color-default" data-toggle="modal" data-target="#change-group">修改</a></th>
  84. <?php } ?>
  85. </tr>
  86. <tbody ng-repeat="module_tpl in modules_tpl | filter:{'type':'extend'}">
  87. <tr>
  88. <td colspan="5" class="text-left we7-padding-right" ng-init="module_tpl.show = true">
  89. <span>{{module_tpl.name}}</span>
  90. </td>
  91. <td>
  92. <div class="link-group">
  93. <a href="javascript:;" class="color-default" ng-show="module_tpl.show" ng-click="module_tpl.show = false">收起</a>
  94. <a href="javascript:;" class="color-default" ng-show="!module_tpl.show" ng-click="module_tpl.show = true">展开</a>
  95. </div>
  96. </td><!--默认展开-->
  97. </tr>
  98. <tr ng-show="module_tpl.show">
  99. <td colspan="5">
  100. <div class="col-sm-1 color-gray text-left we7-padding-none"><?php echo $account->typeName?>应用</div>
  101. <div class="col-sm-11">
  102. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in module_tpl.modules">
  103. <div ng-if="module.name != 'all'" class="text-over text-left">
  104. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  105. {{ module.title }}
  106. </div>
  107. <label class="label label-info" ng-if="module.name == 'all'">所有模块</label>
  108. </div>
  109. </div>
  110. </td>
  111. <td class="we7-padding-right color-default"></td>
  112. </tr>
  113. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?>
  114. <tr ng-show="module_tpl.show">
  115. <td colspan="5">
  116. <div class="col-sm-1 color-gray text-left we7-padding-none">模板</div>
  117. <div class="col-sm-11">
  118. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="tpl in module_tpl.templates">
  119. <a href="javascript:;" class="label label-info" ng-bind="tpl.title"></a>
  120. </div>
  121. </div>
  122. </td>
  123. <td class="we7-padding-right color-default"></td>
  124. </tr>
  125. <?php } ?>
  126. </tbody>
  127. </table>
  128. <table class="table we7-table table-hover account-package-extra">
  129. <tr>
  130. <th colspan="5" class="text-left">
  131. <span class="we7-padding-right">附加权限</span>
  132. <span></span>
  133. </th>
  134. <?php if($_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER && !in_array($owner['uid'], $founders) || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER && $owner['uid'] != $_W['uid']) { ?>
  135. <th class="text-right"><a class="color-default" data-toggle="modal" data-target="#jurisdiction-add">修改</a></th>
  136. <?php } ?>
  137. </tr>
  138. <?php if(!in_array($owner['uid'], $founders)) { ?>
  139. <tr>
  140. <td colspan="6">
  141. <div class="col-sm-1 color-gray text-left we7-padding-none"><?php echo $account->typeName?>应用</div>
  142. <div class="col-sm-11 js-extra-modules">
  143. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.modules" ng-if="extend.modules">
  144. <div ng-if="module.name != 'all'" class="text-over text-left">
  145. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  146. {{ module.title }}
  147. </div>
  148. <label class="label label-info" ng-if="module.name == 'all'">所有模块</label>
  149. </div>
  150. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.modules">
  151. <a href="javascript:;">---</a>
  152. </div>
  153. </div>
  154. </td>
  155. </tr>
  156. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?>
  157. <tr>
  158. <td colspan="6">
  159. <div class="col-sm-1 color-gray text-left we7-padding-none">模板</div>
  160. <div class="col-sm-11 js-extra-templates">
  161. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="module in extend.templates" ng-if="extend.templates">
  162. <a href="javascript:;" class="label label-info" ng-bind="module.title"></a>
  163. </div>
  164. <div class="col-sm-3 text-left we7-margin-bottom" ng-if="!extend.templates">
  165. <a href="javascript:;">---</a>
  166. </div>
  167. </div>
  168. </td>
  169. </tr>
  170. <?php } ?>
  171. <?php } ?>
  172. </table>
  173. <?php } ?>
  174. <?php if(!empty($account_buy_modules)) { ?>
  175. <table class="table we7-table table-hover" >
  176. <tr>
  177. <th colspan="7" class="text-left">
  178. <span class="we7-padding-right">商城购买模块</span>
  179. <span></span>
  180. </th>
  181. <th class="text-left">
  182. <span class="we7-padding-right">到期时间</span>
  183. <span></span>
  184. </th>
  185. <th class="text-left">
  186. <span class="we7-padding-right">操作</span>
  187. <span></span>
  188. </th>
  189. </tr>
  190. <tbody>
  191. <tr>
  192. <td colspan="9">
  193. <?php echo $account->typeName?>应用
  194. </td>
  195. </tr>
  196. <?php if(is_array($account_buy_modules)) { foreach($account_buy_modules as $module) { ?>
  197. <?php if($module['goods_id']) { ?>
  198. <tr>
  199. <td>
  200. <img src="<?php echo $module['logo'];?>" class="img-responsive icon" alt="" style="width:50px;height:50px;">
  201. </td>
  202. <td>
  203. <?php echo $module['title'];?>
  204. </td>
  205. <td>
  206. <?php $expire_week = strtotime('-1 week', $module['expire_time']);?>
  207. <?php if($module['expire_time'] > TIMESTAMP && $expire_week < TIMESTAMP) { ?>
  208. <span class="text text-error">即将到期</span>
  209. <?php } ?>
  210. </td>
  211. <td colspan="5">
  212. <?php if($module['expire_time'] < TIMESTAMP) { ?>
  213. 已到期
  214. <?php } else { ?>
  215. <?php echo date('Y-m-d', $module['expire_time'])?>
  216. <?php } ?>
  217. <?php if(permission_check_account_user('see_account_post_modules_tpl_edit_store_endtime')) { ?>
  218. <a href="javascript:;" class="color-default" data-toggle="modal" ng-click="editEndTime('<?php echo date('Y-m-d', $module['expire_time'])?>', <?php echo $module['order_id'];?>)">修改</a>
  219. <?php } ?>
  220. </td>
  221. <td class="we7-padding-right color-default">
  222. <?php if(permission_check_account_user('see_modules_recharge')) { ?>
  223. <a href="<?php echo url('site/entry/goodsbuyer', array('direct' => 1, 'operate' => 'goods_info', 'm' => 'store', 'goods' => $module['goods_id']))?>">续费</a>
  224. <?php } ?>
  225. <?php if(permission_check_account_user('see_modules_deactivate')) { ?>
  226. <a href="<?php echo url('site/entry/deactivateOrder', array('direct' => 1, 'm' => 'store', 'order_id' => $module['order_id'], 'goods_id' => $module['goods_id'], 'uniacid' => $uniacid, 'type' => $_GPC['account_type']))?>">删除</a>
  227. <?php } ?>
  228. </td>
  229. </tr>
  230. <?php } ?>
  231. <?php } } ?>
  232. </tbody>
  233. </table>
  234. <?php } ?>
  235. <?php if(!empty($account_buy_package)) { ?>
  236. <table class="table we7-table table-hover" >
  237. <tr>
  238. <th colspan="2" class="text-left">
  239. <span class="we7-padding-right">商城购买权限组</span>
  240. <span></span>
  241. </th>
  242. <th colspan="4">
  243. 到期时间
  244. </th>
  245. </tr>
  246. <tbody ng-repeat="package in packagelist">
  247. <tr>
  248. <td colspan="3" class="text-left we7-padding-right" ng-init="module_tpl.show = true">
  249. <span>{{ package['name'] }}</span>
  250. <span class="text text-danger" ng-if="package.near_expire">即将到期</span>
  251. </td>
  252. <td>
  253. {{ package.expire_time }}
  254. <?php if(permission_check_account_user('see_account_post_modules_tpl_edit_store_endtime')) { ?><a href="javascript:;" class="color-default" data-toggle="modal" ng-click="editEndTime(package.expire_time, package.order_id)">修改</a><?php } ?>
  255. </td>
  256. <td>
  257. <a class="color-default" href="<?php echo url('site/entry/goodsbuyer', array('direct' => 1, 'operate' => 'goods_info', 'm' => 'store'))?>&goods={{ package.goods_id }}">续费</a>
  258. </td>
  259. <td>
  260. <div class="link-group">
  261. <a href="javascript:;" class="color-default" ng-show="module_tpl.show" ng-click="module_tpl.show = false">收起</a>
  262. <a href="javascript:;" class="color-default" ng-show="!module_tpl.show" ng-click="module_tpl.show = true">展开</a>
  263. </div>
  264. </td>
  265. </tr>
  266. <tr ng-show="module_tpl.show">
  267. <td colspan="5">
  268. <div class="col-sm-1 color-gray text-left we7-padding-none"><?php echo $account->typeName?>应用</div>
  269. <div class="col-sm-11">
  270. <div class="col-sm-3 text-left we7-margin-bottom"
  271. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?> ng-repeat="module in package.modules"
  272. <?php } else if($account->typeSign == WXAPP_TYPE_SIGN) { ?> ng-repeat="module in package.wxapp"
  273. <?php } else if($account->typeSign == WEBAPP_TYPE_SIGN) { ?> ng-repeat="module in package.webapp"
  274. <?php } else if($account->typeSign == PHONEAPP_TYPE_SIGN) { ?> ng-repeat="module in package.phoneapp"
  275. <?php } else if($account->typeSign == XZAPP_TYPE_SIGN) { ?> ng-repeat="module in package.xzapp"
  276. <?php } else if($account->typeSign == ALIAPP_TYPE_SIGN) { ?> ng-repeat="module in package.aliapp"
  277. <?php } ?> >
  278. <div ng-if="module.name != 'all'" class="text-over text-left">
  279. <img ng-src="{{ module.logo }}" alt="" style="width:50px;height:50px;">
  280. {{ module.title }}
  281. </div>
  282. <label class="label label-info" ng-if="module.name == 'all'">所有模块</label>
  283. </div>
  284. </div>
  285. </td>
  286. <td class="we7-padding-right color-default"></td>
  287. </tr>
  288. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?>
  289. <tr ng-show="module_tpl.show">
  290. <td colspan="5">
  291. <div class="col-sm-1 color-gray text-left we7-padding-none">模板</div>
  292. <div class="col-sm-11">
  293. <div class="col-sm-3 text-left we7-margin-bottom" ng-repeat="tpl in package.templates">
  294. <a href="javascript:;" class="label label-info" ng-bind="tpl.title"></a>
  295. </div>
  296. </div>
  297. </td>
  298. <td class="we7-padding-right color-default"></td>
  299. </tr>
  300. <?php } ?>
  301. </tbody>
  302. </table>
  303. <?php } ?>
  304. <div class="modal fade" id="endtime" role="dialog">
  305. <div class="we7-modal-dialog modal-dialog we7-form">
  306. <div class="modal-content">
  307. <div class="modal-header">
  308. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  309. <div class="modal-title">设置到期时间</div>
  310. </div>
  311. <div class="modal-body">
  312. <div class="form-group">
  313. <?php echo tpl_form_field_date('endtime', '');?>
  314. </div>
  315. </div>
  316. <div class="modal-footer">
  317. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange()">确定</button>
  318. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. <div class="uploader-modal modal fade module" id="jurisdiction-add">
  324. <div class="modal-dialog modal-lg">
  325. <div class="modal-content ">
  326. <div class="modal-header">
  327. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  328. <h4 class="modal-title" id="myModalLabel2">选择</h4>
  329. </div>
  330. <div class="modal-body material-content clearfix">
  331. <div class="material-nav">
  332. <a href="javascript:;" ng-click="tabChange(0)" ng-class="{true:'active',false:''}[jurindex==0]" >应用</a>
  333. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?><a href="javascript:;" ng-click="tabChange(1)" ng-class="{true:'active',false:''}[jurindex==1]">模板</a><?php } ?>
  334. </div>
  335. <div class="material-body" ng-show="jurindex==0" id="content-modules">
  336. <div class="row">
  337. <?php if(is_array($modules)) { foreach($modules as $module_name => $module) { ?>
  338. <?php if(empty($module['issystem']) && $module[$account->typeSign . '_support'] == 2) { ?>
  339. <div class="col-sm-2">
  340. <div class="item <?php if(is_array($current_module_names) && in_array($module_name, $current_module_names)) { ?>active<?php } ?>"
  341. data-title="<?php echo $module['title'];?>"
  342. data-name="<?php echo $module['name'];?>"
  343. ng-click="itemclick()"
  344. onclick="$(this).toggleClass('active')">
  345. <img ng-src="<?php echo $module['logo'];?>" alt="" class="icon"/>
  346. <div class="name"><?php echo $module['title'];?></div>
  347. <div class="mask">
  348. <span class="wi wi-right"></span>
  349. </div>
  350. </div>
  351. </div>
  352. <?php } ?>
  353. <?php } } ?>
  354. </div>
  355. </div>
  356. <?php if($account->typeSign == ACCOUNT_TYPE_SIGN) { ?>
  357. <div class="material-body" ng-show="jurindex==1" id="content-templates">
  358. <div class="row">
  359. <?php if(is_array($templates)) { foreach($templates as $temp) { ?>
  360. <div class="col-sm-2">
  361. <div ng-click="itemclick()" class="item <?php if(is_array($extend['templates']) && in_array($temp, $extend['templates'])) { ?>active<?php } ?>" data-title="<?php echo $temp['title'];?>" data-name="<?php echo $temp['name'];?>" data-id="<?php echo $temp['id'];?>" onclick="$(this).toggleClass('active')">
  362. <i class="wi wi-home" style="color: #ddd;font-size: 48px;position:relative; top:-15px; margin: 0;"></i>
  363. <div class="name"><?php echo $temp['title'];?></div>
  364. <div class="mask">
  365. <span class="wi wi-right"></span>
  366. </div>
  367. </div>
  368. </div>
  369. <?php } } ?>
  370. </div>
  371. </div>
  372. <?php } ?>
  373. </div>
  374. <div class="material-pager text-right clearfix">
  375. <div class="pull-left we7-form">
  376. <input type="checkbox" id="selected-all" ng-model="allmodule" ng-change="allmodulechange(allmodule)">
  377. <label for="selected-all">全选</label>
  378. </div>
  379. <ul class="pagination">
  380. </ul>
  381. </div>
  382. <div class="modal-footer">
  383. <button type="button" class="btn btn-primary" ng-click="addExtend()">确定</button>
  384. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. <div class="modal" id="change-group">
  390. <div class="modal-dialog we7-modal-dialog">
  391. <div class="modal-content">
  392. <div class="modal-header">
  393. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  394. </div>
  395. <div class="modal-body">
  396. <div class="tab-content we7-form">
  397. <table class="table we7-table table-hover">
  398. <tr>
  399. <th class="text-left bg-light-gray">应用权限组(各权限组均包含系统模块和微站默认模板)</th>
  400. <th class="text-right bg-light-gray">操作</th>
  401. </tr>
  402. <?php if(permission_check_account_user('see_account_manage_module_tpl_all_permission')) { ?>
  403. <tr>
  404. <td class="text-left">
  405. <input id="check-0" type="checkbox" name="package[]" autocomplete="off" value="-1" <?php if(is_array($owner['group']['package']) && in_array('-1', $owner['group']['package'])) { ?>checked disabled<?php } ?><?php if(is_array($extendpackage) && !empty($extendpackage['-1'])) { ?>checked <?php } ?> />
  406. <label for="check-0" class="we7-padding-left we7-margin-horizontal-none">所有服务</label>
  407. </td>
  408. <td class="text-left">
  409. <div class="link-group">
  410. <a href="javascript:;" class="color-default js-unfold" data-toggle="collapse" data-target="#extend0" ng-click="changeText($event)">展开</a>
  411. </div>
  412. </td>
  413. </tr>
  414. <tr class="collapse bg-light-gray" aria-expanded="true" id="extend0">
  415. <td colspan="2">
  416. <div class="col-sm-2 color-gray text-left we7-padding-none">应用权限</div>
  417. <div class="col-sm-10">
  418. <div class="col-sm-3 text-left">
  419. <span class="label label-danger">系统所有模块</span>
  420. </div>
  421. </div>
  422. <div class="col-sm-2 color-gray text-left we7-padding-none">模板权限</div>
  423. <div class="col-sm-10">
  424. <div class="col-sm-3 text-left">
  425. <span class="label label-danger">系统所有模板</span>
  426. </div>
  427. </div>
  428. </td>
  429. </tr>
  430. <?php } ?>
  431. <?php if(is_array($uni_groups)) { foreach($uni_groups as $package) { ?>
  432. <?php if(!(is_array($owner['group']['package']) && in_array($package['id'], $owner['group']['package']))) { ?>
  433. <tr>
  434. <td class="text-left">
  435. <input id="check-<?php echo $package['id'];?>" type="checkbox" name="package[]" autocomplete="off" <?php if(is_array($owner['group']['package']) && in_array($package['id'], $owner['group']['package'])) { ?>checked disabled<?php } ?> <?php if(is_array($extendpackage) && !empty($extendpackage[$package['id']])) { ?>checked <?php } ?> value="<?php echo $package['id'];?>" />
  436. <label for="check-<?php echo $package['id'];?>" class="we7-padding-left we7-margin-horizontal-none"><?php echo $package['name'];?></label>
  437. </td>
  438. <td>
  439. <div class="link-group">
  440. <a href="javascript:;" class="color-default js-unfold" data-toggle="collapse" data-target="#extend<?php echo $package['id'];?>" ng-click="changeText($event)">展开</a>
  441. </div>
  442. </td>
  443. </tr>
  444. <tr class="collapse bg-light-gray" aria-expanded="true" id="extend<?php echo $package['id'];?>">
  445. <td colspan="2">
  446. <div>
  447. <div class="col-sm-2 color-gray text-left we7-padding-none">应用权限</div>
  448. <div class="col-sm-10">
  449. <div class="col-sm-3 text-left" ng-style="{'margin-right': '35px','margin-bottom': '15px'}">
  450. <a href="javascript:;" class="label label-info">系统模块</a>
  451. </div>
  452. <?php if(is_array($package['modules'])) { foreach($package['modules'] as $module) { ?>
  453. <div class="col-sm-3 text-left" ng-style="{'margin-right': '35px','margin-bottom': '15px'}">
  454. <a href="javascript:;" class="label label-info"><?php echo $module['title'];?></a>
  455. </div>
  456. <?php } } ?>
  457. </div>
  458. </div>
  459. <div>
  460. <div class="col-sm-2 color-gray text-left we7-padding-none">模板权限</div>
  461. <div class="col-sm-10">
  462. <div class="col-sm-3 text-left" ng-style="{'margin-right': '35px','margin-bottom': '15px'}">
  463. <a href="javascript:;" class="label label-info">微站默认模板</a>
  464. </div>
  465. <?php if(is_array($package['templates'])) { foreach($package['templates'] as $template) { ?>
  466. <div class="col-sm-3 text-left" ng-style="{'margin-right': '35px','margin-bottom': '15px'}">
  467. <a href="javascript:;" class="label label-info"><?php echo $template['title'];?></a>
  468. </div>
  469. <?php } } ?>
  470. </div>
  471. </div>
  472. </td>
  473. </tr>
  474. <?php } ?>
  475. <?php } } ?>
  476. </table>
  477. </div>
  478. </div>
  479. <div class="modal-footer">
  480. <button type="button" class="btn btn-primary" ng-click="changeGroup()">确定</button>
  481. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  482. </div>
  483. </div>
  484. </div>
  485. </div>
  486. </div>
  487. <script>
  488. angular.module('accountApp').value('config', {
  489. owner: <?php echo !empty($owner) ? json_encode($owner) : 'null'?>,
  490. packagelist: <?php echo !empty($account_buy_package) ? json_encode($account_buy_package) : 'null'?>,
  491. modules_tpl: <?php echo !empty($modules_tpl) ? json_encode($modules_tpl) : 'null'?>,
  492. extend: <?php echo !empty($extend) ? json_encode($extend) : 'null'?>,
  493. links: {
  494. postModulesTpl: "<?php echo url('account/post/modules_tpl', array('acid' => $acid, 'uniacid' => $uniacid))?>",
  495. },
  496. });
  497. angular.bootstrap($('#js-account-manage-modules-tpl'), ['accountApp']);
  498. </script>
  499. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>