123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- @extends('admin.public.base')
- @section('body_class')
- style="margin: 0 auto;width: 96%;padding: 30px 0px;"
- @endsection
- @section('content')
- <div class="page-header">
- @if( check_auth('admin/video_course/add') )
- <a href="{{url('admin/video_course/add')}}" class="btn btn-primary">新增</a>
- @endif
- </div>
- <form action="" method="get" class="form-horizontal form-line">
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
- <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入课程标题查询" />
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
- <select class="form-control" name="type_id" >
- <option value="0" >课程类型</option>
- @foreach ($typeList as $value)
- <option value="{{$value['id']}}" @if( $value['id'] == request('type_id','') ) selected @endif >{{$value['name']}}</option>
- @endforeach
- </select>
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
- <select class="form-control" name="status" >
- <option value="" >课程状态</option>
- <option value="0" @if( !is_null(request('status')) && request('status',0) == 0 ) selected @endif >启用</option>
- <option value="1" @if( !is_null(request('status')) && request('status',0) == 1 ) selected @endif >停用</option>
- </select>
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
- <input type="text" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入开始时间查询" />
- </div>
- <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-12" style="margin-right: 2px;">
- <input type="text" class="form-control" name="end_time" value="{{request('end_time','')}}" placeholder="请输入结束时间查询" />
- </div>
- <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
- <a href="{{url('admin/video_course/index')}}" class="btn btn-sm btn-default" >重置</a>
- @csrf
- </form>
- <div class="row">
- <div class="col-xs-12">
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>ID</th>
- <th>课程名称</th>
- <th>课中习题</th>
- <th>课后习题</th>
- <th>课程有效期</th>
- <th>课程状态</th>
- <th>课程类型</th>
- <th>修改时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($list as $a)
- <tr>
- <td> {{$a['id']}}</td>
- <td> {{$a['name']}}</td>
- <td>
- @if( check_auth('admin/video_learn_question/index') )
- <a href="{{url('admin/video_learn_question/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课中习题">
- 课中习题
- </a>
- @endif
- </td>
- <td>
- @if( check_auth('admin/video_exam_question/index') )
- <a href="{{url('admin/video_exam_question/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课后习题">
- 课后习题
- </a>
- @endif
- </td>
- <td>
- <p>开始:{{date('Y/m/d H:i',$a['start_time'])}} </p>
- <p>结束: {{date('Y/m/d H:i',$a['end_time'])}} </p>
- </td>
- <td> @if ($a['status'] == 0) 启用 @endif @if ($a['status'] == 1) 停用 @endif</td>
- <td> {{$a['type_name']}}</td>
- <td> {{date('Y/m/d H:i',$a['update_time'])}}</td>
- <td>
- @if( check_auth('admin/video_course/edit') )
- <a class="btn btn-sm btn-primary" href="{{url('admin/video_learn_record/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="学习记录">
- 学习记录
- </a>
- @endif
- @if( check_auth('admin/video_course/edit') )
- <a class="btn btn-sm btn-primary" href="{{url('admin/video_exam_record/index?'.http_build_query(['course_id'=>$a['id']]))}}" title="课后评测记录">
- 课后评测记录
- </a>
- @endif
- @if( check_auth('admin/video_course/edit') )
- <a class="btn btn-sm btn-warning" href="{{url('admin/video_course/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
- 修改
- </a>
- @endif
- @if( check_auth('admin/video_course/set_status') )
- @if ( $a['status'] )
- <a class="delete btn btn-sm btn-success" data-url="{{url('admin/video_course/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
- 启用
- </a>
- @else
- <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/video_course/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'1']))}}">
- 停用
- </a>
- @endif
- @endif
- </td>
- </tr>
- @endforeach
- <tr>
- <td colspan="20" class="page">{{$list->render()}}</td>
- </tr>
- <tr>
- <td colspan="20">总计 {{$list->total()}} 个课程</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- @endsection
|