index.blade.php 4.1 KB

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