123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- @extends('admin.public.base')
- @section('body_class')
- style="margin: 0 auto;width: 96%;padding: 30px 0px;"
- @endsection
- @section('content')
- @if(check_auth('admin/video_answer/add'))
- <div class="page-header">
- <a href="{{url('admin/video_answer/add?'.http_build_query(['question_id'=>request('question_id',0)]))}}" class="btn btn-primary">新增</a>
- </div>
- @endif
- <form action="" method="get" class="form-horizontal form-line">
- <div class="form-group col col-lg-8 col-md-12 col-sm-12 col-xs-12" style="margin-right: 2px;">
- <select name="question_id" class="form-control selectpicker" data-live-search="true" data-live-search-placeholder="搜索题目" data-none-results-text="未搜索到 {0}" title="选择题目">
- @foreach ($questionList as $value)
- <option value="{{$value['id']}}" @if( $value['id'] == request('question_id',0) ) selected="" @endif >{{$value['title']}}</option>
- @endforeach
- </select>
- </div>
- <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
- <a href="{{url('admin/video_answer/index')}}" class="btn btn-sm btn-default" >重置</a>
- </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>
- </tr>
- </thead>
-
- <tbody>
- @foreach ($list as $a)
- <tr>
- <th>{{$a['id']}}</th>
- <td>
- @foreach ($questionList as $value)
- @if( $value['id'] == $a['question_id'] )
- {{$value['title']}}
- @endif
- @endforeach
- </td>
- <td>{{$a['value']}}</td>
- <td>
- @if( $a['is_answer'] )
- 是
- @else
- 否
- @endif
- </td>
- <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
- <td>
- @if(check_auth('admin/video_answer/edit'))
- <a href="{{url('admin/video_answer/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
- @endif
- @if(check_auth('admin/video_answer/set_answer'))
- @if( !$a['is_answer'] )
- <a data-url="{{url('admin/video_answer/set_answer?'.http_build_query(['id'=>$a['id'],'is_answer'=>1]))}}" class="set_status btn btn-sm btn-danger" >设为答案</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
|