create.blade.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title>角色 | Yunshop</title>
  7. <!-- Tell the browser to be responsive to screen width -->
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <!-- Bootstrap 3.3.6 -->
  10. <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
  11. <!-- Font Awesome -->
  12. <link rel="stylesheet" href="/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  13. <!-- Ionicons -->
  14. <link rel="stylesheet" href="/libs/ionicons/2.0.1/css/ionicons.min.css">
  15. <!-- Theme style -->
  16. <link rel="stylesheet" href="/dist/css/AdminLTE.min.css">
  17. <!-- iCheck -->
  18. <link rel="stylesheet" href="/plugins/iCheck/square/blue.css">
  19. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  20. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  21. <!--[if lt IE 9]>
  22. <script src="/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
  23. <script src="/libs/respond/1.4.2/respond.min.js"></script>
  24. <![endif]-->
  25. </head>
  26. <body class="hold-transition login-page">
  27. <div class="main animsition">
  28. <div class="container-fluid">
  29. <div class="row">
  30. <div class="">
  31. <div class="panel panel-default">
  32. <div class="panel-heading">
  33. <h3 class="panel-title">添加角色</h3>
  34. </div>
  35. <div class="panel-body">
  36. <form class="form-horizontal" role="form" method="POST" action="/index.php/admin/role/create">
  37. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  38. <input type="hidden" name="cove_image"/>
  39. <div class="form-group">
  40. <label for="tag" class="col-md-3 control-label">角色名称</label>
  41. <div class="col-md-5">
  42. <input type="text" class="form-control" name="name" id="tag" value="{{ $name }}" autofocus>
  43. </div>
  44. </div>
  45. <div class="form-group">
  46. <label for="tag" class="col-md-3 control-label">角色概述</label>
  47. <div class="col-md-5">
  48. <textarea name="description" class="form-control" rows="3">{{ $description }}</textarea>
  49. </div>
  50. </div>
  51. <div class="form-group">
  52. <label for="tag" class="col-md-3 control-label">权限列表</label>
  53. </div>
  54. <div class="form-group">
  55. <div class="form-group">
  56. @if($permissionAll)
  57. @foreach($permissionAll[0] as $v)
  58. <div class="form-group">
  59. <label class="control-label col-md-3 all-check">
  60. {{$v['label']}}:
  61. </label>
  62. <div class="col-md-6">
  63. @if(isset($permissionAll[$v['id']]))
  64. @foreach($permissionAll[$v['id']] as $vv)
  65. <div class="col-md-4" style="float:left;padding-left:20px;margin-top:8px;">
  66. <span class="checkbox-custom checkbox-default">
  67. <i class="fa"></i>
  68. <input class="form-actions"
  69. @if(in_array($vv['id'],$permissions))
  70. checked
  71. @endif
  72. id="inputChekbox{{$vv['id']}}" type="Checkbox" value="{{$vv['id']}}"
  73. name="permissions[]"> <label for="inputChekbox{{$vv['id']}}">
  74. {{$vv['label']}}
  75. </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  76. </span>
  77. </div>
  78. @endforeach
  79. @endif
  80. </div>
  81. </div>
  82. @endforeach
  83. @endif
  84. </div>
  85. </div>
  86. <div class="form-group">
  87. <div class="col-md-7 col-md-offset-3">
  88. <button type="submit" class="btn btn-primary btn-md">
  89. <i class="fa fa-plus-circle"></i>
  90. 添加
  91. </button>
  92. </div>
  93. </div>
  94. </form>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <!-- /.login-box -->
  102. <!-- jQuery 2.2.0 -->
  103. <script src="/plugins/jQuery/jQuery-2.2.0.min.js"></script>
  104. <!-- Bootstrap 3.3.6 -->
  105. <script src="/bootstrap/js/bootstrap.min.js"></script>
  106. <!-- iCheck -->
  107. <script src="/plugins/iCheck/icheck.min.js"></script>
  108. <script>
  109. $(function () {
  110. $('input').iCheck({
  111. checkboxClass: 'icheckbox_square-blue',
  112. radioClass: 'iradio_square-blue',
  113. increaseArea: '20%' // optional
  114. });
  115. });
  116. </script>
  117. </body>
  118. </html>