人人商城

permission.html 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. {template 'common/header-gw'}
  2. <style type="text/css">
  3. table li{margin-left:-50px;clear:both;list-style:none;}
  4. small a{color:#999;}
  5. </style>
  6. {template 'extension/module-tabs'}
  7. <div class="clearfix">
  8. <div class="form form-horizontal">
  9. <h4 class="page-header">模块基本信息 <small>这里来定义你自己模块的基本信息</small></h4>
  10. <div class="table-responsive">
  11. <table class="table">
  12. <tr>
  13. <th style="width:144px"><label for="">模块名称</label></th>
  14. <td>
  15. {$module['title']}
  16. </td>
  17. </tr>
  18. <tr>
  19. <th><label for="">模块标识</label></th>
  20. <td>
  21. {$module['name']}
  22. </td>
  23. </tr>
  24. <tr>
  25. <th><label for="">版本</label></th>
  26. <td>
  27. {$module['version']}
  28. </td>
  29. </tr>
  30. <tr>
  31. <th><label for="">模块类型</label></th>
  32. <td>
  33. <span class="label label-info">
  34. {if empty($issystem)}
  35. {if empty($modtypes[$module['type']]['title'])}
  36. 其他
  37. {else}
  38. {$modtypes[$module['type']]['title']}
  39. {/if}
  40. {else}
  41. 系统
  42. {/if}
  43. </span>
  44. </td>
  45. </tr>
  46. <tr>
  47. <th><label for="">模块简述</label></th>
  48. <td>
  49. {$module['ability']}
  50. </td>
  51. </tr>
  52. <tr>
  53. <th><label for="">模块介绍</label></th>
  54. <td>
  55. {$module['description']}
  56. </td>
  57. </tr>
  58. <tr>
  59. <th><label for="">作者</label></th>
  60. <td>
  61. {$module['author']}
  62. </td>
  63. </tr>
  64. <tr>
  65. <th><label for="">发布页</label></th>
  66. <td>
  67. {$module['url']}
  68. </td>
  69. </tr>
  70. {if $module['settings']}
  71. <tr>
  72. <th><label for="">设置项</label></th>
  73. <td>
  74. 存在全局设置项(针对公众号独立保存)
  75. </td>
  76. </tr>
  77. {/if}
  78. {if $version_error}
  79. <tr>
  80. <th><label for="">版本不兼容</label></th>
  81. <td>
  82. 当前模块与系统版本不兼容
  83. <a href="{php echo url('extension/module/convert', array('id' => $module['name']))}">转换模块版本</a>
  84. </td>
  85. </tr>
  86. {else}
  87. {if $module['isinstall']}
  88. <tr>
  89. <th><label for="">卸载及更新</label></th>
  90. <td>
  91. 当前模块已安装
  92. {if $module['upgrade']}<a href="{php echo url('extension/module/upgrade', array('id' => $module['name']))}" style="color:red;">更新</a>{/if}
  93. {if !$module['issystem']}<a href="{php echo url('extension/module/uninstall', array('id' => $module['name']))}">卸载此模块</a>{/if}
  94. </td>
  95. </tr>
  96. {else}
  97. <tr>
  98. <th><label for="">安装模块</label></th>
  99. <td>
  100. 当前模块还未安装
  101. <a href="{php echo url('extension/module/install', array('id' => $module['name']))}">安装此模块</a>
  102. </td>
  103. </tr>
  104. {/if}
  105. {/if}
  106. {if $module['issystem']}
  107. <tr>
  108. <th><label for="">系统模块</label></th>
  109. <td>
  110. 此模块由系统内置, 不能删除
  111. </td>
  112. </tr>
  113. {/if}
  114. </table>
  115. </div>
  116. <h4 class="page-header">公众平台消息处理选项</h4>
  117. <div class="table-responsive">
  118. <table class="table">
  119. <tr>
  120. <th style="width:144px;"><label for="">订阅的消息类型</label></th>
  121. <td>
  122. {if empty($module['subscribes'])}
  123. <label>
  124. <i class="fa fa-square-o"> &nbsp; 没有订阅任何消息类型</i>
  125. </label>
  126. {else}
  127. {loop $module['subscribes'] $k $v}
  128. <label>
  129. <i class="fa fa-check-square-o"> &nbsp; {$mtypes[$v]}</i>
  130. </label>
  131. {/loop}
  132. {/if}
  133. <span class="help-block">订阅特定的消息类型后, 此消息类型的消息到达微擎系统后将会以通知的方式(消息数据只读, 并不能返回处理结果)调用模块的接受器, 用这样的方式可以实现全局的数据统计分析等功能. 请参阅 <a href="http://www.we7.cc/docs/#flow-module-subscribe">模块消息订阅</a></span>
  134. <div class="alert-warning alert">注意: 订阅的消息信息是只读的, 只能用作分析统计, 不能更改, 也不能改变微擎处理主流程</div>
  135. </td>
  136. </tr>
  137. <tr>
  138. <th><label for="">直接处理的类型</label></th>
  139. <td>
  140. {if empty($module['handles'])}
  141. <label>
  142. <i class="fa fa-square-o"> &nbsp; 不能直接处理任何消息类型</i>
  143. </label>
  144. {else}
  145. {loop $module['handles'] $k $v}
  146. <label>
  147. <i class="fa fa-check-square-o"> &nbsp; {$mtypes[$v]}</i>
  148. </label>
  149. {/loop}
  150. {/if}
  151. <span class="help-block">当前模块能够直接处理的消息类型(没有上下文的对话语境, 能直接处理消息并返回数据). 如果公众平台传递过来的消息类型不在设定的类型列表中, 那么系统将不会把此消息路由至此模块</span>
  152. <div class="alert-warning alert">
  153. 注意: 关键字路由只能针对文本消息有效, 文本消息最为重要. 其他类型的消息并不能被直接理解, 多数情况需要使用文本消息来进行语境分析, 再处理其他相关消息类型
  154. <br>注意: 上下文锁定的模块不受此限制, 上下文锁定期间, 任何类型的消息都会路由至锁定模块
  155. </div>
  156. </td>
  157. </tr>
  158. {if $module['isrulefields']}
  159. <tr>
  160. <th><label for="">是否要嵌入规则</label></th>
  161. <td>
  162. 需要嵌入规则
  163. </td>
  164. </tr>
  165. {/if}
  166. </table>
  167. </div>
  168. <h4 class="page-header">微站功能绑定 <small>这里来定义此功能模块中微站的相关功能如何同系统对接</small></h4>
  169. <div class="table-responsive">
  170. <table class="table">
  171. {loop $points $point $row}
  172. <tr>
  173. <th style="width:144px"><label for="">{$row['title']}</label></th>
  174. <td>
  175. {if !empty($module[$point])}
  176. <ul class="unstyled">
  177. {loop $module[$point] $v}
  178. <li class="clearfix">
  179. <div class="col-xs-12 col-sm-12 col-md-4" style="margin-bottom:1em;">
  180. <div class="input-group">
  181. <span class="input-group-addon">操作名称</span>
  182. <input class="form-control" type="text" disabled value="{$v['title']}">
  183. </div>
  184. </div>
  185. <div class="col-xs-12 col-sm-4 col-md-3" style="margin-bottom:1em;">
  186. <div class="input-group">
  187. <span class="input-group-addon">入口标识</span>
  188. <input class="form-control" type="text" disabled value="{$v['do']}">
  189. </div>
  190. </div>
  191. <div class="col-xs-12 col-sm-5 col-md-3" style="margin-bottom:1em;">
  192. <div class="input-group">
  193. <span class="input-group-addon">操作附加数据</span>
  194. <input class="form-control" type="text" disabled value="{$v['state']}">
  195. </div>
  196. </div>
  197. {if $v['direct'] && $point != 'menu'}
  198. <div class="col-xs-12 col-sm-3 col-md-2" style="margin-bottom:1em;">
  199. <label class="checkbox inline">
  200. <i class="fa fa-check-square-o"> &nbsp; 无需登录</i>
  201. </label>
  202. </div>
  203. {/if}
  204. </li>
  205. {/loop}
  206. </ul>
  207. <span class="help-block">{$row['desc']}</span>
  208. <span class="help-block"><strong>注意: {$row['title']}扩展功能定义于 WeSite 类的实现中</strong></span>
  209. {if $point == 'menu' && !$flag && !empty($manifest['permissions'])}
  210. {php $flag = 1;}
  211. <h4>权限标识</h4>
  212. <div class="clearfix" style="margin-left:-15px">
  213. {loop $manifest['permissions'] $permission}
  214. <div class="col-xs-12 col-lg-2" style="margin-bottom:1em;">
  215. <div class="input-group">
  216. <span class="input-group-addon">{$permission['title']}</span>
  217. <input class="form-control" type="text" disabled value="{$permission['permission']}">
  218. </div>
  219. </div>
  220. {/loop}
  221. </div>
  222. {/if}
  223. {else}
  224. <span class="help-block">未定义</span>
  225. {/if}
  226. </td>
  227. </tr>
  228. {/loop}
  229. </table>
  230. </div>
  231. <h4 class="page-header">模块发布 <small>这里来定义模块发布时需要的配置项</small></h4>
  232. <div class="table-responsive">
  233. <table class="table">
  234. <tr>
  235. <th style="width:144px;"><label for="">模块缩略图</label></th>
  236. <td>
  237. <img class="media-object" width="48" height="48" src="{$cion}" onerror="this.src='./resource/images/nopic-small.jpg'">
  238. </td>
  239. </tr>
  240. <tr>
  241. <th><label for="">模块封面</label></th>
  242. <td>
  243. <img class="media-object" width="600" height="350" src="{$preview}" onerror="this.src='./resource/images/nopic.jpg'">
  244. </td>
  245. </tr>
  246. <tr>
  247. <th></th>
  248. <td>
  249. <input type="button" class="btn btn-primary" name="submit" onclick="history.go(-1)" value="返回" />
  250. </td>
  251. </tr>
  252. </table>
  253. </div>
  254. </div>
  255. </div>
  256. {template 'common/footer-gw'}