index.blade.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-title">
  7. <h5>通话列表</h5>
  8. <div class="ibox-tools">
  9. <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
  10. </a>
  11. </div>
  12. </div>
  13. <div class="ibox-content">
  14. <div class="form-group">
  15. <div class="row">
  16. <div class="col-sm-4">
  17. <form method="GET" action="" accept-charset="UTF-8">
  18. <div class="input-group">
  19. <input type="text" class="form-control" value="{{Request::get('keyword')}}"
  20. placeholder="请输入关键词"
  21. name="keyword">
  22. <span class="input-group-append">
  23. <button type="submit" class="btn btn-primary"
  24. style="height: 100%">搜索</button>
  25. </span>
  26. </div>
  27. </form>
  28. </div>
  29. @if(role('Call/List/create'))
  30. <div class="col-sm-8 pull-right">
  31. <a href="{{ U('Call/List/create')}}" class="btn btn-primary pull-right">添加</a>
  32. </div>
  33. @endif
  34. </div>
  35. </div>
  36. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  37. <thead>
  38. <tr>
  39. <th class="sorting" data-sort="id"> ID</th>
  40. <th class="sorting" data-sort="phone"> 电话号码</th>
  41. <th class="sorting" data-sort="ip"> 拨打IP</th>
  42. <th class="sorting" data-sort="sync"> 是否同步到拨打列表:</th>
  43. <th class="sorting" data-sort="created_at"> 添加时间</th>
  44. <th class="sorting" data-sort="updated_at"> 更新时间</th>
  45. <th width="22%">相关操作</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. @if(isset($list))
  50. @foreach($list as $key => $item)
  51. <tr>
  52. <td>{{ $item->id }}</td>
  53. <td>{{ $item->phone }}</td>
  54. <td>{{ $item->ip }}</td>
  55. <td>{{ dict()->get('call_list','sync',$item->sync) }}</td>
  56. <td>{{ $item->created_at }}</td>
  57. <td>{{ $item->updated_at }}</td>
  58. <td>
  59. @if(role('Call/List/destroy'))
  60. <a class="btn btn-sm btn-danger"
  61. href="{{ U('Call/List/destroy',['id'=>$item->id])}}"
  62. onclick="return confirm('你确定执行删除操作?');">删除</a>
  63. @endif
  64. </td>
  65. </tr>
  66. @endforeach
  67. @endif
  68. </tbody>
  69. </table>
  70. <div class="row">
  71. <div class="col-sm-6">
  72. <div class="dataTables_info" id="DataTables_Table_0_info"
  73. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  74. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  75. </div>
  76. </div>
  77. <div class="col-sm-6">
  78. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  79. {!! $list->setPath('')->appends(Request::all())->render() !!}
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. @endsection