index.blade.php 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. @extends('admin.layout')
  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="row">
  15. <form method="GET" action="" accept-charset="UTF-8">
  16. <div class="col-sm-4">
  17. <div class="input-group">
  18. <input type="text" value="{{Request::get('keyword')}}" placeholder="ID/标题/电话"
  19. name="keyword" class="input-sm form-control">
  20. <span class="input-group-btn">
  21. <button type="submit" class="btn btn-sm btn-primary">搜索</button>
  22. </span>
  23. </div>
  24. </div>
  25. </form>
  26. </div>
  27. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  28. <thead>
  29. <tr>
  30. <th class="sorting" data-sort="id"> ID</th>
  31. <th class="sorting" data-sort="title"> 标题</th>
  32. <th class="sorting" data-sort="user_id">发布人ID</th>
  33. <th class="sorting">发布人</th>
  34. <th class="sorting" data-sort="price"> 金额</th>
  35. <th class="sorting"> 完成度</th>
  36. <th class="sorting" data-sort="phone">联系方式</th>
  37. <th class="sorting" data-sort="type"> 类型</th>
  38. <th width="22%">相关操作</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @if(isset($list))
  43. @foreach($list as $key => $item)
  44. <tr>
  45. <td>{{ $item->id }}</td>
  46. <td>{{ $item->title }}</td>
  47. <td>{{ $item->user_id }}</td>
  48. <td>{{ $item->user }}</td>
  49. <td>{{ $item->price }}</td>
  50. <td>{{ $item->state }}</td>
  51. <td>{{ $item->phone }}</td>
  52. <td>{{ $item->type }}</td>
  53. <td>
  54. @if(role('Messages/Info/view'))
  55. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Messages/Info/view',['id'=>$item->id])}}'});"
  56. class="btn btn-primary ">查看内容
  57. </button>
  58. @endif
  59. </td>
  60. </tr>
  61. @endforeach
  62. @endif
  63. </tbody>
  64. </table>
  65. <div class="row">
  66. <div class="col-sm-6">
  67. <div class="dataTables_info" id="DataTables_Table_0_info"
  68. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  69. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  70. </div>
  71. </div>
  72. <div class="col-sm-6">
  73. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  74. {!! $list->setPath('')->appends(Request::all())->render() !!}
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. @endsection