人人商城

groups.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. {template 'common/header-gw'}
  2. <ol class="breadcrumb">
  3. <li><a href="./?refresh"><i class="fa fa-home"></i></a></li>
  4. <li><a href="{url 'system/welcome'}">系统</a></li>
  5. {if $do == 'display'}<li class="active">服务套餐列表</li>{/if}
  6. {if $do == 'post'}<li class="active">{if $id}编辑{else}添加{/if}服务套餐</li>{/if}
  7. </ol>
  8. <ul class="nav nav-tabs">
  9. <li {if $do == 'display'}class="active"{/if}><a href="{php echo url('account/groups/display');}">服务套餐列表</a></li>
  10. <li {if $do == 'post'}class="active"{/if}><a href="{php echo url('account/groups/post');}">{if $id}编辑{else}添加{/if}服务套餐</a></li>
  11. </ul>
  12. {if $do == 'post'}
  13. <form class="form-horizontal form" action="" method="post" enctype="multipart/form-data">
  14. <div class="clearfix">
  15. <input type="hidden" name="id" value="{$id}" />
  16. <input type="hidden" name="templateid" value="{$template['id']}">
  17. <h5 class="page-header">服务套餐管理</h5>
  18. <div class="form-group">
  19. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">服务套餐名称</label>
  20. <div class="col-sm-10 col-xs-12">
  21. <input type="text" class="form-control" name="name" id="name" value="{$item['name']}" />
  22. </div>
  23. </div>
  24. <h5 class="page-header">设置当前用户允许访问的模块</h5>
  25. <div class="panel panel-default">
  26. <div class="panel-body table-responsive">
  27. <table class="table">
  28. <thead>
  29. <tr>
  30. <th class="row-first"><input class="modules" type="checkbox" onclick="$('.modules-module').prop('checked', !$('.modules-module').prop('checked'))">&nbsp;&nbsp;(全选)选择</th>
  31. <th>模块名称</th>
  32. <th>模块标识</th>
  33. <th>功能简介</th>
  34. <th></th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. {loop $modules $module}
  39. <tr>
  40. <td class="row-first">{if !$module['issystem']}<input class="modules-module" type="checkbox" value="{$module['name']}" name="modules[]" {if !empty($item['modules']) && in_array($module['name'], $item['modules'])}checked{/if} />{else}<input class="modules" type="checkbox" value="{$module['name']}" name="modules[]" disabled checked />{/if}</td>
  41. <td>{$module['title']}</td>
  42. <td>{$module['name']}</td>
  43. <td>{$module['ability']}</td>
  44. <td>{if $module['issystem']}<span class="label label-success">系统模块</span>{/if}</td>
  45. </tr>
  46. {/loop}
  47. <input class="modules" type="checkbox" value="1" hidden= name="modules[]" checked />
  48. </tbody>
  49. </table>
  50. </div>
  51. </div>
  52. <h5 class="page-header">设置当前用户允许访问的模板</h5>
  53. <div class="panel panel-default">
  54. <div class="panel-body table-responsive">
  55. <table class="table">
  56. <thead>
  57. <tr>
  58. <th><input class="modules" type="checkbox" onclick="$('.modules-temp').prop('checked', !$('.modules-temp').prop('checked'))">&nbsp;&nbsp;(全选)选择</th>
  59. <th>模板名称</th>
  60. <th>模板标识</th>
  61. <th>功能简介</th>
  62. <th></th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. {loop $templates $temp}
  67. <tr>
  68. <td class="row-first">{if $temp['name'] != 'default'}<input class="modules-temp" type="checkbox" value="{$temp['id']}" name="templates[]" {if !empty($item['templates']) && in_array($temp['id'], $item['templates'])}checked{/if} />{else}<input class="modules" type="checkbox" value="{$temp['id']}" name="templates[]" disabled checked />{/if}</td>
  69. <td>{$temp['title']}</td>
  70. <td>{$temp['name']}</td>
  71. <td>{$temp['description']}</td>
  72. <td></td>
  73. </tr>
  74. {/loop}
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. <div class="form-group">
  80. <div class="col-sm-12">
  81. <input name="token" type="hidden" value="{$_W['token']}" />
  82. <input type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交" />
  83. </div>
  84. </div>
  85. </div>
  86. </form>
  87. {elseif $do == 'display'}
  88. <style>
  89. ul.ul-float{padding:0;marign:0}
  90. ul.ul-float li{float:left;width:115px;height:30px;line-height:30px;overflow:hidden;}
  91. </style>
  92. <form action="" method="post">
  93. <div class="panel panel-default">
  94. <div class="clearfix table-responsive panel-body">
  95. <table class="table">
  96. <thead>
  97. <tr>
  98. <th style="width:30px;">删?</th>
  99. <th style="width:150px;">名称</th>
  100. <th>可用模块</th>
  101. <th>可用模板</th>
  102. <th style="min-width:60px;">操作</th>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. <tr>
  107. <td><input type="checkbox" disabled value="{$item['id']}" /></td>
  108. <td>基础服务<span class="label label-info">系统</span></td>
  109. <td>
  110. <ul class="ul-float">
  111. <li>基本文字回复</li>
  112. <li>基本混合图文回复</li>
  113. <li>基本语音回复</li>
  114. <li>自定义接口回复</li>
  115. </ul>
  116. </td>
  117. <td>
  118. <ul class="ul-float">
  119. <li>微站默认模板</li>
  120. </ul>
  121. </td>
  122. <td><span></span></td>
  123. </tr>
  124. <tr>
  125. <td><input type="checkbox" disabled value="{$item['id']}" /></td>
  126. <td>所有服务<span class="label label-info">系统</span></td>
  127. <td>
  128. <span class="label label-danger">系统所有模块</span></li>
  129. </td>
  130. <td>
  131. <ul class="ul-float">
  132. <span class="label label-danger">系统所有模板</span></li>
  133. </ul>
  134. </td>
  135. <td><span></span></td>
  136. </tr>
  137. {loop $list $item}
  138. <tr>
  139. <td><input type="checkbox" name="delete[]" value="{$item['id']}" /></td>
  140. <td>{$item['name']}</td>
  141. <td>
  142. <ul class="ul-float">
  143. {loop $item['modules'] $module}
  144. <li>{$module['title']}</li>
  145. {/loop}
  146. </ul>
  147. </td>
  148. <td>
  149. <ul class="ul-float">
  150. {loop $item['templates'] $template}
  151. <li>{$template['title']}</li>
  152. {/loop}
  153. </ul>
  154. </td>
  155. <td><span><a href="{php echo url('account/groups/post', array('id' => $item['id']))}">编辑</a></span></td>
  156. </tr>
  157. {/loop}
  158. </tbody>
  159. <tr>
  160. <th></th>
  161. <td>
  162. <input name="token" type="hidden" value="{$_W['token']}" />
  163. <input type="submit" class="btn btn-primary" name="submit" value="提交" />
  164. </td>
  165. </tr>
  166. </table>
  167. </div>
  168. </div>
  169. </form>
  170. {/if}
  171. {template 'common/footer-gw'}