data.blade.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  2. <thead>
  3. <tr>
  4. <th>
  5. <label><input type="checkbox" id="checkAll"> 本页</label>
  6. <label><input type="checkbox" id="checkTotal"> 全部</label>
  7. </th>
  8. <th class="sorting" data-sort="id"> ID</th>
  9. <th class="sorting" data-sort="phone"> 电话号码</th>
  10. <th class="sorting" data-sort="ip"> 拨打IP</th>
  11. <th class="sorting" data-sort="sync"> 是否同步到拨打列表:</th>
  12. <th class="sorting" data-sort="created_at"> 添加时间</th>
  13. <th class="sorting" data-sort="updated_at"> 更新时间</th>
  14. <th width="22%">相关操作</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. @if(isset($list))
  19. @foreach($list as $key => $item)
  20. <tr>
  21. <td>
  22. <label><input class="calllist" name='calllist_id[]' type="checkbox"
  23. value="{{ $item->id }}" data-id="{{ $item->id }}"></label>
  24. </td>
  25. <td>{{ $item->id }}</td>
  26. <td>{{ $item->phone }}</td>
  27. <td>{{ $item->ip }}</td>
  28. <td>{{ dict()->get('call_list','sync',$item->sync) }}</td>
  29. <td>{{ $item->created_at }}</td>
  30. <td>{{ $item->updated_at }}</td>
  31. <td>
  32. @if(role('Call/List/destroy'))
  33. <a class="btn btn-sm btn-danger"
  34. href="{{ U('Call/List/destroy',['id'=>$item->id])}}"
  35. onclick="return confirm('你确定执行删除操作?');">删除</a>
  36. @endif
  37. </td>
  38. </tr>
  39. @endforeach
  40. @endif
  41. </tbody>
  42. </table>
  43. <div class="row">
  44. <div class="col-sm-6">
  45. <div class="dataTables_info" id="DataTables_Table_0_info"
  46. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  47. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  48. </div>
  49. </div>
  50. <div class="col-sm-6">
  51. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  52. {!! $list->setPath('')->appends(Request::all())->render() !!}
  53. </div>
  54. </div>
  55. </div>