index.blade.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 text-center text-red">列表页宣发链接:{{$urlLink??''}}</div>
  50. <div class="col-xs-12">
  51. <div class="table-responsive">
  52. <table class="table table-striped table-bordered table-hover">
  53. <thead>
  54. <tr>
  55. <th>ID</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. <th>修改时间</th>
  65. <th>操作</th>
  66. </tr>
  67. </thead>
  68. <tbody>
  69. @foreach ($list as $a)
  70. <tr>
  71. <td> {{$a['id']}}</td>
  72. <td> {{$a['name']}}</td>
  73. <td>
  74. @if( check_auth('admin/video_learn_question/index') )
  75. <a href="{{url('admin/video_learn_question/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课中习题">
  76. 课中习题
  77. </a>
  78. @endif
  79. </td>
  80. <td>
  81. @if( check_auth('admin/video_exam_question/index') )
  82. <a href="{{url('admin/video_exam_question/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课后习题">
  83. 课后习题
  84. </a>
  85. @endif
  86. </td>
  87. <td>
  88. <p>开始:{{date('Y/m/d H:i',$a['start_time'])}} </p>
  89. <p>结束: {{date('Y/m/d H:i',$a['end_time'])}} </p>
  90. </td>
  91. <td> @if ($a['status'] == 0) 启用 @endif @if ($a['status'] == 1) 停用 @endif</td>
  92. <td> {{$a['type_name']}}</td>
  93. <td> {{$a['service_name']}}</td>
  94. <td> {{$a['mp_urllink']??''}} </td>
  95. <td> {{date('Y/m/d H:i',$a['update_time'])}}</td>
  96. <td>
  97. @if( check_auth('admin/video_course/edit') )
  98. <a class="btn btn-sm btn-primary" href="{{url('admin/video_learn_record/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="学习记录">
  99. 学习记录
  100. </a>
  101. @endif
  102. @if( check_auth('admin/video_course/edit') )
  103. <a class="btn btn-sm btn-primary" href="{{url('admin/video_exam_record/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课后评测记录">
  104. 课后评测记录
  105. </a>
  106. @endif
  107. @if( check_auth('admin/video_course/edit') )
  108. <a class="btn btn-sm btn-warning" href="{{url('admin/video_course/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
  109. 修改
  110. </a>
  111. @endif
  112. @if( check_auth('admin/video_course/set_status') )
  113. @if ( $a['status'] )
  114. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/video_course/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  115. 启用
  116. </a>
  117. @else
  118. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/video_course/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'1']))}}">
  119. 停用
  120. </a>
  121. @endif
  122. @endif
  123. </td>
  124. </tr>
  125. @endforeach
  126. <tr>
  127. <td colspan="20" class="page">{{$list->render()}}</td>
  128. </tr>
  129. <tr>
  130. <td colspan="20">总计 {{$list->total()}} 个课程</td>
  131. </tr>
  132. </tbody>
  133. </table>
  134. </div>
  135. </div>
  136. </div>
  137. @endsection