| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | 
							- @extends('admin.layout')
 
- <style type="text/css">
 
- </style>
 
- @section('header')
 
- @endsection
 
- @section('content')
 
- <div id="sg-main-container-sg">
 
-     <div class="wrapper wrapper-content animated fadeInRight">
 
-         <div class="row">
 
-             <div class="col-sm-12">
 
-                 <div class="ibox float-e-margins">
 
-                     <div class="ibox-title">
 
-                         <h5>{{ $model_name . '列表' }}</h5>
 
-                         <div class="ibox-tools">
 
-                             <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
 
-                             </a>
 
-                         </div>
 
-                     </div>
 
-                     <div class="ibox-content">
 
-                         <div class="row">
 
-                             <div class="col-sm-4">
 
-                                 <form>
 
-                                     <div class="input-group">
 
-                                         <input type="text" value="{{ request('keyword') }}"	placeholder="请输入讲师姓名/课程名/学员名搜索" name="keyword" class="input-sm form-control">
 
-                                         <span class="input-group-btn">
 
- 									        <button type="submit" class="btn btn-sm btn-primary">搜索</button>
 
- 								        </span>
 
-                                     </div>
 
-                                 </form>
 
-                             </div>
 
-                         </div>
 
-                         <table class="table table-striped table-bordered table-hover dataTables-example dataTable" id="sg-main-table">
 
-                             <thead>
 
-                                 <tr>
 
-                                     <th>讲师姓名</th>
 
-                                     <th>课程种类</th>
 
-                                     <th>评价平均分</th>
 
-                                     <th>学员姓名</th>
 
-                                     <th>评价时间</th>
 
-                                     <th>操作</th>
 
-                                 </tr>
 
-                             </thead>
 
-                             <tbody>
 
-                                 @if($list->count() <= 0)
 
-                                     <tr>
 
-                                         <td colspan="6" style="text-align: center;">暂无{{ $model_name }}</td>
 
-                                     </tr>
 
-                                 @else
 
-                                     @foreach($list as $item)
 
-                                         <tr>
 
-                                             <td>{{ empty($item->teacher) ? '' : $item->teacher->name }}</td>
 
-                                             <td>{{ empty($item->course) ? '' : $item->course->name }}</td>
 
-                                             <td>{{ $item->average_score }}</td>
 
-                                             <td>{{ empty($item->student) ? '' : $item->student->name }}</td>
 
-                                             <td>{{ $item->updated_at }}</td>
 
-                                             <td>
 
-                                                 <div class="btn-group">
 
-                                                     <a class="btn btn-sm btn-info btn-detail" href="{{ $pre_uri . 'detail?id=' . $item->id }}">详情</a>
 
-                                                     <div class="btn btn-sm btn-danger btn-delete" data-id="{{ $item->id }}">删除</div>
 
-                                                 </div>
 
-                                             </td>
 
-                                         </tr>
 
-                                     @endforeach
 
-                                 @endif
 
-                             </tbody>
 
-                         </table>
 
-                         <div class="row">
 
-                             <div class="col-sm-12">{{ $list->links() }}</div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <div class="modal fade" id="delete-modal" tabindex="-1" role="dialog" aria-labelledby="delete-label" aria-hidden="true">
 
-     <div class="modal-dialog">
 
-         <form id="delete-form" method="POST" action="{{ $pre_uri . 'delete' }}">
 
-             {{ csrf_field() }}
 
-             <input type="hidden" name="id" id="delete-input-id">
 
-             <div class="modal-content">
 
-                 <div class="modal-header">
 
-                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
 
-                     <h4 class="modal-title" id="delete-label">确定要删除吗?</h4>
 
-                 </div>
 
-                 <div class="modal-footer">
 
-                     <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
 
-                     <button type="submit" class="btn btn-danger">删除</button>
 
-                 </div>
 
-             </div>
 
-         </form>
 
-     </div>
 
- </div>
 
- @endsection
 
- @section('footer')
 
- <script type="text/javascript">
 
- $(function () {
 
-     $('#sg-main-table').on('click', '.btn-delete', function () {
 
-         $('#delete-input-id').val($(this).attr('data-id'));
 
-         $('#delete-modal').modal('show');
 
-     });
 
- })
 
- </script>
 
- @endsection
 
 
  |