index.blade.php 4.9 KB

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