index.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <a href="{:U('Roles/add')}" class="btn btn-primary">新增角色</a>
  5. </div>
  6. <div class="row">
  7. <div class="col-xs-12">
  8. <div class="table-responsive">
  9. <table class="table table-striped table-bordered table-hover">
  10. <thead>
  11. <tr>
  12. <th>角色名称</th>
  13. <th>备注</th>
  14. <th>状态</th>
  15. <th>操作</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. <volist name="roles" id="role" empty="$empty">
  20. <tr>
  21. <td align="left">{$role['fullname']}</td>
  22. <td>{$role['description']}</td>
  23. <td><if condition="$role['status'] eq 1">已启用<else/>已禁用</if></td>
  24. <td>[ <a href="{:U('Roles/edit', array('id' => $role['id']))}">编辑</a> ] <if condition="(1 == $_SESSION['oscshop_admin_s']['user_auth']['is_super']) ">[ <a href="{:U('Roles/assignAccess', array('id' => $role['id']))}">分配权限</a> ]</if></td>
  25. </tr>
  26. </volist>
  27. <tr>
  28. <td colspan="20" class="page">{$page}</td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. </div>
  34. </div>
  35. </block>
  36. <block name="javascript">
  37. <script>
  38. $(function(){
  39. $("#search").click(function () {
  40. var url = $(this).attr('url');
  41. var query = $('.search-form').find('input,select').serialize();
  42. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  43. query = query.replace(/^&/g, '');
  44. if (url.indexOf('?') > 0) {
  45. url += '&' + query;
  46. } else {
  47. url += '?' + query;
  48. }
  49. window.location.href = url;
  50. });
  51. });
  52. </script>
  53. </block>