@extends('admin.layout')

@section('content')
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>查询记录</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">
                        <form method="GET" action="" accept-charset="UTF-8">

                            <div class="col-sm-4">
                                <div class="input-group">
                                    <input type="text" value="{{Request::get('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>
                            </div>
                        </form>
                    </div>

                    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
                        <thead>
                        <tr>
                            <th class="sorting" data-sort="is_paid"> 是否付费</th>
                            <th class="sorting" data-sort="cnumber"> 考号</th>
                            <th class="sorting" data-sort="grade"> 高考分数</th>
                            <th class="sorting" data-sort="mobile"> 联系方式</th>
                            <th class="sorting" data-sort="query_time">查询时间</th>
                            <th class="sorting" data-sort="code">推荐码</th>
                        </tr>
                        </thead>
                        <tbody>
                        @if(isset($list))
                            @foreach($list as $key => $item)
                                <tr>
                                    <td>{{ $item->is_paid }}</td>
                                    <td>{{ $item->cnumber }}</td>
                                    <td>{{ $item->grade }}</td>
                                    <td>{{ $item->mobile }}</td>
                                    <td>{{ $item->query_time }}</td>
                                    <td>{{ $item->code }}</td>

                                </tr>
                            @endforeach
                        @endif

                        </tbody>
                    </table>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="dataTables_info" id="DataTables_Table_0_info"
                                 role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
                                条，共{{ $list->lastPage() }}页，总{{ $list->total() }}条。
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                {!! $list->setPath('')->appends(Request::all())->render() !!}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection