index.blade.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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/Records/create'))
  30. <div class="col-sm-8 pull-right">
  31. <a href="{{ U('Call/Records/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="start_time"> 拨打时间 </th>
  42. <th class="sorting" data-sort="end_time"> 结束时间 </th>
  43. <th class="sorting" data-sort="record_path"> 录音地址 </th>
  44. <th class="sorting" data-sort="hangup_dispostion"> 挂断原因 </th>
  45. <th class="sorting" data-sort="ip"> 拨打IP </th>
  46. <th width="22%">相关操作</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. @if(isset($list))
  51. @foreach($list as $key => $item)
  52. <tr>
  53. <td>{{ $item->id }}</td>
  54. <td>{{ $item->phone }}</td>
  55. <td>{{ $item->start_time }}</td>
  56. <td>{{ $item->end_time }}</td>
  57. <td>{{ $item->record_path }}</td>
  58. <td>{{ $item->hangup_dispostion }}</td>
  59. <td>{{ $item->ip }}</td>
  60. <td>
  61. @if(role('Call/Records/update'))
  62. <button class="btn btn-sm btn-success"
  63. onclick="window.location.href='{{ U('Call/Records/update',['id'=>$item->id])}}' ">
  64. 修改
  65. </button>
  66. @endif
  67. @if(role('Call/Records/destroy'))
  68. <a class="btn btn-sm btn-danger"
  69. href="{{ U('Call/Records/destroy',['id'=>$item->id])}}"
  70. onclick="return confirm('你确定执行删除操作?');">删除</a>
  71. @endif
  72. @if(role('Call/Records/view'))
  73. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Call/Records/view',['id'=>$item->id])}}'});"
  74. class="btn btn-sm btn-primary ">查看
  75. </button>
  76. @endif
  77. </td>
  78. </tr>
  79. @endforeach
  80. @endif
  81. </tbody>
  82. </table>
  83. <div class="row">
  84. <div class="col-sm-6">
  85. <div class="dataTables_info" id="DataTables_Table_0_info"
  86. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  87. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  88. </div>
  89. </div>
  90. <div class="col-sm-6">
  91. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  92. {!! $list->setPath('')->appends(Request::all())->render() !!}
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. @endsection