group.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. {template 'common/header'}
  2. {if $do == 'display'}
  3. <div class="js-system-module_group" ng-controller="moduleGroupCtrl" ng-cloak>
  4. <div class="combo-list">
  5. <div class="search-box we7-margin-bottom clearfix">
  6. <form action="" method="get" class="search-form">
  7. <input type="hidden" name="c" value="module">
  8. <input type="hidden" name="a" value="group">
  9. <input type="hidden" name="do" value="display">
  10. <div class="input-group">
  11. <input class="form-control" name="name" value="{$_GPC['name']}" type="text" placeholder="名称" >
  12. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  13. </div>
  14. </form>
  15. {if permission_check_account_user('see_module_manage_system_group_add')}
  16. <a href="{php echo url('module/group/post')}" class="btn btn-primary">添加应用权限套餐</a>
  17. {/if}
  18. </div>
  19. <table class="table we7-table table-hover ">
  20. <col width="200px" />
  21. <col>
  22. <col width="200px" />
  23. <tr>
  24. <th class="text-left">套餐名称</th>
  25. <th>包含应用和模块</th>
  26. <th class="text-right">操作</th>
  27. </tr>
  28. {loop $modules_group_list $module_group}
  29. <tr >
  30. <td class="text-left">{$module_group['name']}</td>
  31. <td>
  32. <div class="we7-group-app hideall" >
  33. {loop $module_group['modules_all'] $module}
  34. <div class="item media">
  35. <div class="media-left media-middle">
  36. <a href="#">
  37. <img class="media-object logo module-img" src="{$module['logo']}" alt="...">
  38. </a>
  39. </div>
  40. <div class="media-body media-middle">
  41. <h4 class="media-heading title">{$module['title']}</h4>
  42. <div class="support-list">
  43. {if is_array($module['group_support'])}
  44. {loop $module['group_support'] $support}
  45. <i class="wi wi-{if $support == 'phoneapp'}app{else}{$support}{/if}"></i>
  46. {/loop}
  47. {/if}
  48. </div>
  49. </div>
  50. </div>
  51. {/loop}
  52. {loop $module_group['templates'] $template}
  53. <div class="item media">
  54. <div class="media-left media-middle">
  55. <a href="#">
  56. <img class="media-object logo template-img" src="{$template['logo']}" alt="...">
  57. </a>
  58. </div>
  59. <div class="media-body media-middle">
  60. <h4 class="media-heading title">{$template['title']}</h4>
  61. <div class="support-list">
  62. <i class="wi wi-template"></i>
  63. </div>
  64. </div>
  65. </div>
  66. {/loop}
  67. </div>
  68. </td>
  69. <td>
  70. <div class="link-group">
  71. {if ($module_group['modules_all'] ? count($module_group['modules_all']) : 0) + ($module_group['templates'] ? count($module_group['templates']) : 0) > 5}
  72. <a href="javascript:;" class="color-default js-unfold" ng-click="changeText($event)">展开</a>
  73. {/if}
  74. {if $_W['role'] == ACCOUNT_MANAGE_NAME_FOUNDER || $_W['role'] == ACCOUNT_MANAGE_NAME_VICE_FOUNDER}
  75. <a href="{php echo url('module/group/post', array('id' => $module_group['id']))}">编辑套餐</a>
  76. <a href="javascript:void(0);" class="del" ng-click="delUniGroup('{php echo url("module/group/delete", array("id" => $module_group["id"]))}')">删除</a>
  77. {/if}
  78. </div>
  79. </td>
  80. </tr>
  81. {/loop}
  82. </table>
  83. <div class="pull-right">
  84. {$pager}
  85. </div>
  86. </div>
  87. </div>
  88. <script>
  89. angular.bootstrap($('.js-system-module_group'), ['moduleApp']);
  90. </script>
  91. {elseif $do == 'post'}
  92. <div id="js-module-group-edit" ng-controller="moduleGroupEditCtrl" ng-cloak>
  93. <ol class="breadcrumb we7-breadcrumb">
  94. <a href="{php echo url('module/group')}"><i class="wi wi-back-circle"></i> </a>
  95. <li><a href="{php echo url('module/group') }">套餐应用列表</a></li>
  96. <li>添加套餐应用列表</li>
  97. </ol>
  98. <div class="we7-form">
  99. <div class="form-group">
  100. <label class="control-label col-sm-2">应用套餐组名称</label>
  101. <div class="form-controls col-sm-4">
  102. <input type="text" name="group_name" class="form-control" ng-model="module_name">
  103. <span class="help-block">请输入应用套餐组</span>
  104. </div>
  105. </div>
  106. <div class="form-group">
  107. <label class="control-label col-sm-2">添加应用</label>
  108. <div class="form-controls col-sm-10">
  109. <div class="group-post-mudules">
  110. <div class="module-item" ng-repeat="module in module_list.modules" ng-if="module.checked == 1">
  111. <div class="logo">
  112. <img ng-src="{{module.logo}}" class="module-img" alt="">
  113. </div>
  114. <div class="info">
  115. <div ng-bind="module.title" class="title text-over">1213</div>
  116. <div class="icon">
  117. <i class="{{module.support | moduleInfo:'icon'}}"></i>
  118. </div>
  119. </div>
  120. <div class="delete">
  121. <i class="wi wi-error" ng-click="deleteModuleSupport([module.support], module.name)"></i>
  122. </div>
  123. </div>
  124. <div class="module-item" ng-repeat="template in module_list.templates" ng-if="template.checked == 1">
  125. <div class="logo">
  126. <img ng-src="{{template.logo}}" class="template-img" alt="">
  127. </div>
  128. <div class="info">
  129. <div class="name text-over" ng-bind="template.title">1213</div>
  130. <div class="icon">
  131. <i class="wi wi-template"></i>
  132. </div>
  133. </div>
  134. <div class="delete">
  135. <i class="wi wi-error" ng-click="deleteTemplate(template)"></i>
  136. </div>
  137. </div>
  138. <we7-modal-app module-list="module_list" title="'添加应用'" multiple="true" >
  139. <div class="module-item add" >
  140. <i class="wi wi-plus"></i> 添加应用
  141. </div>
  142. </we7-modal-app>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="form-group">
  147. <label class="control-label col-sm-2"></label>
  148. <div class="form-controls col-sm-8">
  149. <button class="btn btn-primary we7-padding-horizontal" ng-click="saveGroup()">提 交</button>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <script>
  155. angular.module('moduleApp').value('config', {
  156. group_id: '{$group_id}',
  157. module_name: '{$group["name"]}',
  158. save_module_group_url: "{php echo url('module/group/save')}",
  159. module_list: {php echo json_encode($module_list)},
  160. });
  161. angular.bootstrap($('#js-module-group-edit'), ['moduleApp']);
  162. </script>
  163. {/if}
  164. {template 'common/footer'}