index.blade.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. @extends('layouts.admin')
  2. @section('content')
  3. <!--左侧菜单栏-->
  4. @include('admin.left-sidebar')
  5. <!-- 内容 -->
  6. <div class="content-wrapper">
  7. <!-- Content Header (Page header) -->
  8. <section class="content-header">
  9. <h1>
  10. 系统设置
  11. <small> </small>
  12. </h1>
  13. <ol class="breadcrumb">
  14. <li><a href="{{ url('/')}}"><i class="fa fa-dashboard"></i> 主页</a></li>
  15. <li><a href="#">系统设置</a></li>
  16. <li><a href="{{ url('/job') }}">职位管理</a></li>
  17. </ol>
  18. </section>
  19. <!-- Main content -->
  20. <section class="content">
  21. <!-- Default box -->
  22. <div class="box">
  23. <div class="box-header">
  24. <h3 class="box-title">职位管理</h3>
  25. </div>
  26. <!-- /.box-header -->
  27. <div class="box-body">
  28. <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
  29. <div class="row">
  30. <div class="col-sm-11"></div>
  31. <div class="col-sm-1">
  32. @if($user->role>1)
  33. <a href="{{ url('/job/create') }}" class="btn btn-primary tooltips">
  34. <i class="fa fa-plus"></i>新增</a>
  35. @endif
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="col-sm-12">
  40. <table class="table mb30">
  41. <thead>
  42. <tr>
  43. <th>权限</th>
  44. <th>职位名称</th>
  45. <th>职位详述</th>
  46. <th>操作</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. @foreach($data as $list)
  51. <tr>
  52. <td>{{ $list -> role }}</td>
  53. <td>{{ $list -> display_name }}</td>
  54. <td>{{ $list -> description}}</td>
  55. <td>
  56. @if($user->role>1)
  57. <a href="{{ url('/job/'.$list->id.'/edit') }}" class="btn btn-primary btn-sm">
  58. <i class="fa fa-pencil"></i> 编辑</a>
  59. @if($list->display == 1)
  60. <a href="javascript:;" onclick="ting({{ $list->id }})" class="btn btn-danger btn-sm article-delete">
  61. <i class="fa fa-eye-slash"></i> 隐藏</a>
  62. @else
  63. <a href="javascript:;" onclick="start({{ $list->id }})" class="btn btn-success btn-sm article-delete">
  64. <i class="fa fa-eye"></i> 启用</a>
  65. @endif
  66. @else
  67. 您的权限不足
  68. @endif
  69. </td>
  70. </tr>
  71. @endforeach
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. <div class="row">
  77. <div class="col-sm-5">
  78. <div class="dataTables_info" id="example2_info" role="status" aria-live="polite"></div>
  79. </div>
  80. <div class="col-sm-7">
  81. <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
  82. <ul class="pagination">
  83. </ul>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <!-- /.box-body -->
  90. </div>
  91. <!-- /.box -->
  92. </section>
  93. <!-- /.content -->
  94. </div>
  95. <!-- /.content-wrapper -->
  96. <script>
  97. function del_user(job_id){
  98. layer.confirm('确定要删除这个职位吗?',{
  99. btn:['确定','取消']
  100. },function(){
  101. $.post('{{ url('/job/') }}/'+job_id,{
  102. '_method':'delete',
  103. '_token' :'{{ csrf_token() }}'
  104. },function(data){
  105. if(data.status == 1){
  106. location.href = location.href;
  107. layer.alert(data.msg, {icon: 6});
  108. }else {
  109. layer.alert(data.msg, {icon: 5});
  110. }
  111. });
  112. },function(){
  113. });
  114. }
  115. function ting(job_id){
  116. layer.confirm('确定要隐藏这个职位吗?',{
  117. btn:['确定','取消']
  118. },function(){
  119. $.post('{{ url('/job/ting') }}/'+job_id,{
  120. '_token' :'{{ csrf_token() }}'
  121. },function(data){
  122. if(data.status == 1){
  123. location.href = location.href;
  124. layer.alert(data.msg, {icon: 6});
  125. }else {
  126. layer.alert(data.msg, {icon: 5});
  127. }
  128. });
  129. },function(){
  130. });
  131. }
  132. function start(job_id){
  133. layer.confirm('确定要显示这个职位吗?',{
  134. btn:['确定','取消']
  135. },function(){
  136. $.post('{{ url('/job/start') }}/'+job_id,{
  137. '_token' :'{{ csrf_token() }}'
  138. },function(data){
  139. if(data.status == 1){
  140. location.href = location.href;
  141. layer.alert(data.msg, {icon: 6});
  142. }else {
  143. layer.alert(data.msg, {icon: 5});
  144. }
  145. });
  146. },function(){
  147. });
  148. }
  149. </script>
  150. @endsection