index.blade.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. @if(check_auth('admin/video_question/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/video_question/add')}}" class="btn btn-primary">新增</a>
  9. </div>
  10. @endif
  11. <form action="" method="get" class="form-horizontal form-line">
  12. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="title" value="{{request('title','')}}" placeholder="请输入题目查询" />
  14. </div>
  15. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  16. <a href="{{url('admin/video_question/index')}}" class="btn btn-sm btn-default" >重置</a>
  17. </form>
  18. <div class="row">
  19. <div class="col-xs-12">
  20. <div class="table-responsive">
  21. <table class="table table-striped table-bordered table-hover">
  22. <thead>
  23. <tr>
  24. <th>ID</th>
  25. <th>题目</th>
  26. <th>积分</th>
  27. <th>状态</th>
  28. <th>修改时间</th>
  29. <th>操作</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @foreach ($list as $a)
  34. <tr>
  35. <th>{{$a['id']}}</th>
  36. <td>{{$a['title']}}</td>
  37. <td>{{$a['score']}}</td>
  38. <td>
  39. @if( $a['status'] )
  40. 停用
  41. @else
  42. 启用
  43. @endif
  44. </td>
  45. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  46. <td>
  47. @if(check_auth('admin/video_answer/index'))
  48. <a href="{{url('admin/video_answer/index?'.http_build_query(['question_id'=>$a['id']]))}}" class="btn btn-sm btn-primary" >选项</a>
  49. @endif
  50. @if(check_auth('admin/video_question/edit'))
  51. <a href="{{url('admin/video_question/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  52. @endif
  53. @if(check_auth('admin/video_question/set_status'))
  54. @if($a['status'])
  55. <a data-url="{{url('admin/video_question/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  56. @else
  57. <a data-url="{{url('admin/video_question/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  58. @endif
  59. @endif
  60. </td>
  61. </tr>
  62. @endforeach
  63. <tr>
  64. <td colspan="20" class="page">{{$list->render()}}</td>
  65. </tr>
  66. <tr>
  67. <td colspan="20">总计 {{$list->total()}} 个题目</td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. </div>
  74. @endsection