index.blade.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @extends('admin.layout')
  2. @section('content')
  3. <div class="wrapper wrapper-content animated fadeInRight">
  4. <div class="row">
  5. <div class="col-sm-12">
  6. <div class="ibox float-e-margins">
  7. <div class="ibox-title">
  8. <h5>小游戏用户</h5>
  9. <div class="ibox-tools">
  10. <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
  11. </a>
  12. </div>
  13. </div>
  14. <div class="ibox-content">
  15. <div class="row">
  16. <form method="GET" action="" accept-charset="UTF-8">
  17. <div class="col-sm-4">
  18. <div class="input-group">
  19. <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词" 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. @if(role('Album/Xyx/User/create'))
  27. <div class="col-sm-3 pull-right">
  28. <a href="{{ U('Album/Xyx/User/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
  29. </div>
  30. @endif
  31. </div>
  32. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  33. <thead>
  34. <tr>
  35. <th class="sorting" data-sort="id">ID</th>
  36. <th class="sorting" data-sort="username"> 名称 </th>
  37. <th class="sorting" data-sort="avatar"> 用户头像 </th>
  38. <th class="sorting" data-sort="is_agent"> 用户类型 </th>
  39. <th class="sorting" data-sort="created_at"> 加入时间 </th>
  40. <th width="22%">相关操作</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. @if(isset($list))
  45. @foreach($list as $key => $item) <tr>
  46. <td>{{ $item->id }}</td>
  47. <td>{{ $item->username }}</td>
  48. <td><img src="{{ $item->avatar }}"/></td>
  49. @if($item['is_agent'] == 1)
  50. <td>经销商</td>
  51. @else
  52. <td>普通用户</td>
  53. @endif
  54. <td>{{ $item->created_at }}</td>
  55. <td>
  56. <div class="btn-group">
  57. <button data-toggle="dropdown"
  58. class="btn btn-warning btn-sm dropdown-toggle"
  59. aria-expanded="false">
  60. 操作 <span class="caret"></span>
  61. </button>
  62. <ul class="dropdown-menu">
  63. @if(role('Album/User/update'))
  64. <li><a href="{{ U('Album/Xyx/User/update',['id'=>$item->id])}}" class="font-bold">添加经销商</a></li>
  65. @endif
  66. </ul>
  67. </div>
  68. </td>
  69. </tr>
  70. @endforeach
  71. @endif
  72. </tbody>
  73. </table>
  74. <div class="row">
  75. <div class="col-sm-6">
  76. <div class="dataTables_info" id="DataTables_Table_0_info"
  77. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
  78. </div>
  79. <div class="col-sm-6">
  80. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  81. {!! $list->setPath('')->appends(Request::all())->render() !!}
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. @endsection