index.blade.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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_exam_question/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/video_exam_question/add?'.http_build_query(['course_id'=>request('course_id',0)]))}}" 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. <select name="course_id" class="form-control selectpicker" data-live-search="true" data-live-search-placeholder="搜索课程名称" data-none-results-text="未搜索到 {0}" title="选择课程名称">
  14. <option value="0" @if( 0 == request('course_id',0) ) selected @endif>不限课程</option>
  15. @foreach ($courseList as $value)
  16. <option value="{{$value['id']}}" @if( $value['id'] == request('course_id',0) ) selected @endif>{{$value['name']}}</option>
  17. @endforeach
  18. </select>
  19. </div>
  20. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  21. <select name="question_id" class="form-control selectpicker" data-live-search="true" data-live-search-placeholder="搜索习题题目" data-none-results-text="未搜索到 {0}" title="选择习题题目">
  22. <option value="0" @if( 0 == request('question_id',0) ) selected @endif>不限习题</option>
  23. @foreach ($questionList as $value)
  24. <option value="{{$value['id']}}" @if( $value['id'] == request('question_id',0) ) selected @endif>{{$value['title']}}</option>
  25. @endforeach
  26. </select>
  27. </div>
  28. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  29. <a href="{{url('admin/video_exam_question/index')}}" class="btn btn-sm btn-default" >重置</a>
  30. </form>
  31. <div class="row">
  32. <div class="col-xs-12">
  33. <div class="table-responsive">
  34. <table class="table table-striped table-bordered table-hover">
  35. <thead>
  36. <tr>
  37. <th>ID</th>
  38. <th>课程名称</th>
  39. <th>习题题目</th>
  40. <th>状态</th>
  41. <th>修改时间</th>
  42. <th>操作</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @foreach ($list as $a)
  47. <tr>
  48. <th>{{$a['id']}}</th>
  49. <td>{{$a['course_name']}}</td>
  50. <td>{{$a['question_title']}}</td>
  51. <td>
  52. @if( $a['status'] )
  53. 停用
  54. @else
  55. 启用
  56. @endif
  57. </td>
  58. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  59. <td>
  60. @if(check_auth('admin/video_exam_question/edit'))
  61. <a href="{{url('admin/video_exam_question/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  62. @endif
  63. @if(check_auth('admin/video_exam_question/set_status'))
  64. @if($a['status'])
  65. <a data-url="{{url('admin/video_exam_question/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  66. @else
  67. <a data-url="{{url('admin/video_exam_question/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  68. @endif
  69. @endif
  70. </td>
  71. </tr>
  72. @endforeach
  73. <tr>
  74. <td colspan="20" class="page">{{$list->render()}}</td>
  75. </tr>
  76. <tr>
  77. <td colspan="20">总计 {{$list->total()}} 个题目</td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. </div>
  82. </div>
  83. </div>
  84. @endsection