index.blade.php 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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="请输入关键词"
  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">发布人</th>
  33. <th class="sorting" data-sort="price"> 金额</th>
  34. <th class="sorting" data-sort="phone">联系方式</th>
  35. <th class="sorting" data-sort="type"> 类型:0:免费;1:付费;2:收费</th>
  36. <th width="22%">相关操作</th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. @if(isset($list))
  41. @foreach($list as $key => $item)
  42. <tr>
  43. <td>{{ $item->id }}</td>
  44. <td>{{ $item->title }}</td>
  45. <td>{{ $item->user_id }}</td>
  46. <td>{{ $item->price }}</td>
  47. <td>{{ $item->phone }}</td>
  48. <td>{{ $item->type }}</td>
  49. <td>
  50. @if(role('Messages/Info/view'))
  51. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Messages/Info/view',['id'=>$item->id])}}'});"
  52. class="btn btn-primary ">查看
  53. </button>
  54. @endif
  55. </td>
  56. </tr>
  57. @endforeach
  58. @endif
  59. </tbody>
  60. </table>
  61. <div class="row">
  62. <div class="col-sm-6">
  63. <div class="dataTables_info" id="DataTables_Table_0_info"
  64. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  65. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  66. </div>
  67. </div>
  68. <div class="col-sm-6">
  69. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  70. {!! $list->setPath('')->appends(Request::all())->render() !!}
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. @endsection