人人商城

module-permission.html 3.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {template 'common/header'}
  2. {if $do == 'display'}
  3. <div class="clearfix">
  4. <div class="we7-padding-bottom clearfix">
  5. <div class="pull-right">
  6. <a href="{php echo url('profile/module-permission/post', array('m' => $module_name))}" class="btn btn-primary we7-padding-horizontal">添加操作员</a>
  7. </div>
  8. </div>
  9. <table class="table we7-table table-hover">
  10. <thead class="navbar-inner">
  11. <tr>
  12. <th class="text-center" style="width:100px;">操作员名称</th>
  13. <th class="text-center" style="width:150px">权限信息</th>
  14. <th class="text-right" style="width:100px;">操作</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. {if !empty($user_permissions)}
  19. {loop $user_permissions $item}
  20. <tr>
  21. <td class="text-center" style="width:50px;">{$item['user_info']['username']}</td>
  22. <td class="text-center">
  23. {loop $item['permission'] $permission}
  24. <span class="label label-primary">{$permission}</span>
  25. {/loop}
  26. </td>
  27. <td style="width:100px;">
  28. <div class="link-group" >
  29. <a href="{php echo url('profile/module-permission/post', array('uid' => $item['uid'], 'm' => $module_name));}">编辑</a>
  30. <a href="{php echo url('profile/module-permission/delete', array('uid' => $item['uid'], 'm' => $module_name));}" class="del">删除</a>
  31. </div>
  32. </td>
  33. </tr>
  34. {/loop}
  35. {else}
  36. <tr ng-if="!wechats">
  37. <td colspan="3" class="text-center">暂无数据</td>
  38. </tr>
  39. {/if}
  40. </tbody>
  41. </table>
  42. </div>
  43. {/if}
  44. {if $do == 'post'}
  45. <div class="clearfix">
  46. <form action="" method="post" class="form-horizontal ajaxfrom we7-form" role="form" id="form-user">
  47. <div class="form-group">
  48. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">用户名</label>
  49. <div class="col-sm-10 col-lg-9 col-xs-12">
  50. <input id="" name="username" type="text" class="form-control" value="{$user['username']}" />
  51. <span class="help-block">请输入用户名,用户名为 3 到 15 个字符组成,包括汉字,大小写字母(不区分大小写)</span>
  52. </div>
  53. </div>
  54. <div class="form-group">
  55. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">密码</label>
  56. <div class="col-sm-10 col-lg-9 col-xs-12">
  57. <input id="password" name="password" type="password" class="form-control" value="" autocomplete="off" />
  58. <span class="help-block">请填写密码,最小长度为 8 个字符</span>
  59. </div>
  60. </div>
  61. <div class="form-group">
  62. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">确认密码</label>
  63. <div class="col-sm-10 col-lg-9 col-xs-12">
  64. <input id="repassword" name="repassword" type="password" class="form-control" value="" autocomplete="off" />
  65. <span class="help-block">重复输入密码,确认正确输入</span>
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">备注</label>
  70. <div class="col-sm-10 col-lg-9 col-xs-12">
  71. <textarea id="" name="remark" style="height:80px;" class="form-control">{$user['remark']}</textarea>
  72. <span class="help-block">方便注明此用户的身份</span>
  73. </div>
  74. </div>
  75. <div class="form-group">
  76. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">权限设置</label>
  77. <div class="col-sm-10 col-lg-10 col-xs-12">
  78. {loop $current_module_permission $key $permission}
  79. <div class="col-sm-4">
  80. <div class="checkbox">
  81. <input id="check-child-{$key}" type="checkbox" value="{$permission['permission']}" name="module_permission[]" {if !empty($permission['checked'])}checked{/if}>
  82. <label for="check-child-{$key}">{$permission['title']}</label>
  83. </div>
  84. </div>
  85. {/loop}
  86. </div>
  87. </div>
  88. <div class="form-group">
  89. <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-1 col-xs-12 col-sm-10 col-md-10 col-lg-11">
  90. <input type="submit" class="btn btn-primary span3" name="submit" value="提交" />
  91. <input type="hidden" name="token" value="{$_W['token']}" />
  92. </div>
  93. </div>
  94. </form>
  95. </div>
  96. {/if}
  97. {template 'common/footer'}