index.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. <div class="page-header">
  7. @if( check_auth('admin/video_course/add') )
  8. <a href="{{url('admin/video_course/add')}}" class="btn btn-primary">新增</a>
  9. @endif
  10. </div>
  11. <form action="" method="get" class="form-horizontal form-line">
  12. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  13. <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入课程标题查询" />
  14. </div>
  15. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  16. <select class="form-control" name="type_id" >
  17. <option value="0" >课程类型</option>
  18. @foreach ($typeList as $value)
  19. <option value="{{$value['id']}}" @if( $value['id'] == request('type_id','') ) selected @endif >{{$value['name']}}</option>
  20. @endforeach
  21. </select>
  22. </div>
  23. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  24. <select class="form-control" name="service_id" >
  25. <option value="0" >课程客服</option>
  26. @foreach ($serviceList as $value)
  27. <option value="{{$value['id']}}" @if( $value['id'] == request('service_id','') ) selected @endif >{{$value['name']}}</option>
  28. @endforeach
  29. </select>
  30. </div>
  31. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  32. <select class="form-control" name="status" >
  33. <option value="" >课程状态</option>
  34. <option value="0" @if( !is_null(request('status')) && request('status',0) == 0 ) selected @endif >启用</option>
  35. <option value="1" @if( !is_null(request('status')) && request('status',0) == 1 ) selected @endif >停用</option>
  36. </select>
  37. </div>
  38. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  39. <input type="text" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入开始时间查询" />
  40. </div>
  41. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
  42. <input type="text" class="form-control" name="end_time" value="{{request('end_time','')}}" placeholder="请输入结束时间查询" />
  43. </div>
  44. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  45. <a href="{{url('admin/video_course/index')}}" class="btn btn-sm btn-default" >重置</a>
  46. @csrf
  47. </form>
  48. <div class="row">
  49. <div class="col-xs-12">
  50. <div class="table-responsive">
  51. <table class="table table-striped table-bordered table-hover">
  52. <thead>
  53. <tr>
  54. <th>ID</th>
  55. <th>课程名称</th>
  56. <th>课中习题</th>
  57. <th>课后习题</th>
  58. <th>课程有效期</th>
  59. <th>课程状态</th>
  60. <th>课程类型</th>
  61. <th>课程客服</th>
  62. <th>修改时间</th>
  63. <th>操作</th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. @foreach ($list as $a)
  68. <tr>
  69. <td> {{$a['id']}}</td>
  70. <td> {{$a['name']}}</td>
  71. <td>
  72. @if( check_auth('admin/video_learn_question/index') )
  73. <a href="{{url('admin/video_learn_question/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课中习题">
  74. 课中习题
  75. </a>
  76. @endif
  77. </td>
  78. <td>
  79. @if( check_auth('admin/video_exam_question/index') )
  80. <a href="{{url('admin/video_exam_question/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课后习题">
  81. 课后习题
  82. </a>
  83. @endif
  84. </td>
  85. <td>
  86. <p>开始:{{date('Y/m/d H:i',$a['start_time'])}} </p>
  87. <p>结束: {{date('Y/m/d H:i',$a['end_time'])}} </p>
  88. </td>
  89. <td> @if ($a['status'] == 0) 启用 @endif @if ($a['status'] == 1) 停用 @endif</td>
  90. <td> {{$a['type_name']}}</td>
  91. <td> {{$a['service_name']}}</td>
  92. <td> {{date('Y/m/d H:i',$a['update_time'])}}</td>
  93. <td>
  94. @if( check_auth('admin/video_course/edit') )
  95. <a class="btn btn-sm btn-primary" href="{{url('admin/video_learn_record/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="学习记录">
  96. 学习记录
  97. </a>
  98. @endif
  99. @if( check_auth('admin/video_course/edit') )
  100. <a class="btn btn-sm btn-primary" href="{{url('admin/video_exam_record/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课后评测记录">
  101. 课后评测记录
  102. </a>
  103. @endif
  104. @if( check_auth('admin/video_course/edit') )
  105. <a class="btn btn-sm btn-warning" href="{{url('admin/video_course/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
  106. 修改
  107. </a>
  108. @endif
  109. @if( check_auth('admin/video_course/set_status') )
  110. @if ( $a['status'] )
  111. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/video_course/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  112. 启用
  113. </a>
  114. @else
  115. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/video_course/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'1']))}}">
  116. 停用
  117. </a>
  118. @endif
  119. @endif
  120. </td>
  121. </tr>
  122. @endforeach
  123. <tr>
  124. <td colspan="20" class="page">{{$list->render()}}</td>
  125. </tr>
  126. <tr>
  127. <td colspan="20">总计 {{$list->total()}} 个课程</td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. </div>
  132. </div>
  133. </div>
  134. @endsection