<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
    <thead>
    <tr>
        <th>
            <label><input type="checkbox" id="checkAll"> 本页</label>
            <label><input type="checkbox" id="checkTotal"> 全部</label>
        </th>
        <th class="sorting" data-sort="id"> ID</th>
        <th class="sorting" data-sort="phone"> 电话号码</th>
        <th class="sorting" data-sort="start_time"> 拨打时间</th>
        <th class="sorting" data-sort="end_time"> 结束时间</th>
        <th class="sorting" data-sort="intention"> 意向</th>
        <th class="sorting" data-sort="term_status"> 接通状态</th>
        <th class="sorting" data-sort="hangup_dispostion"> 挂断原因</th>
        <th class="sorting" data-sort="ip"> 拨打IP</th>
        <th class="sorting" data-sort="tag"> 标签</th>
        <th width="22%">相关操作</th>
    </tr>
    </thead>
    <tbody>
    @if(isset($list))
        @foreach($list as $key => $item)
            <tr>
                <td>
                    <label><input class="contacts" name='contact_phone[]' type="checkbox"
                                  value="{{ $item->phone }}" data-id="{{ $item->id }}"></label>
                </td>
                <td>{{ $item->id }}</td>
                <td>{{ $item->phone }}</td>
                <td>{{ $item->start_time }}</td>
                <td>{{ $item->end_time }}</td>
                <td>{{ $item->intention }}</td>
                <td>{{ $item->term_status }}</td>
                <td>{{ $item->hangup_dispostion }}</td>
                <td>{{ $item->ip }}</td>
                <td>{{ $item->tag }}</td>
                <td>

                    @if(role('Call/Records/view'))
                        <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Call/Records/view',['id'=>$item->id])}}'});"
                                class="btn btn-sm btn-primary ">对话纪录
                        </button>
                    @endif
                </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>