album-index.blade.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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-8">
  18. <div class="form-group col-sm-5" >
  19. <label class="radio-inline">
  20. <input type="radio" name="is_boss" value="-1"
  21. @if(empty(Request::get('is_boss')) || Request::get('is_boss') == '-1')checked="checked" @endif/>全部
  22. </label>
  23. <label class="radio-inline">
  24. <input type="radio" name="is_boss" value="0"
  25. @if(!empty(Request::get('is_boss')) && Request::get('is_boss') == '0')checked="checked" @endif/>普通用户
  26. </label>
  27. <label class="radio-inline">
  28. <input type="radio" name="is_boss" value="1"
  29. @if(!empty(Request::get('is_boss')) && Request::get('is_boss') == '1')checked="checked" @endif/>经销商
  30. </label>
  31. </div>
  32. <div class="input-group col-sm-4">
  33. <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入昵称/电话"
  34. name="keyword" class="input-sm form-control">
  35. <span class="input-group-btn">
  36. <button type="submit" class="btn btn-sm btn-primary">搜索</button>
  37. </span>
  38. </div>
  39. </div>
  40. </form>
  41. </div>
  42. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  43. <thead>
  44. <tr>
  45. <th class="sorting" data-sort="id">ID</th>
  46. <th class="sorting" data-sort="username"> 微信昵称 </th>
  47. <th class="sorting" data-sort="avatar"> 用户头像</th>
  48. <th class="sorting" data-sort="phone"> 电话</th>
  49. <th class="sorting" data-sort="is_dealer"> 画册角色</th>
  50. <th class="sorting" data-sort="created_at"> 加入时间</th>
  51. <th width="22%">相关操作</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. @if(isset($list))
  56. @foreach($list as $key => $item)
  57. <tr>
  58. <td>{{ $item->id }}</td>
  59. <td>{{ $item->username }}</td>
  60. <td><img src="{{ $item->avatar }}" width="50px"/></td>
  61. <td>{{ $item->phone }}</td>
  62. @if($item['is_dealer'] == 1)
  63. <td>画册经销商</td>
  64. @else
  65. <td>普通用户</td>
  66. @endif
  67. <td>{{ $item->created_at }}</td>
  68. <td>
  69. @if(role('Album/User/update'))
  70. @if($item->is_dealer != 1)
  71. <button onclick="window.location.href='{{ U('Album/User/update',['id'=>$item->id]) }}'"
  72. class="btn btn-warning">设为经销商
  73. </button>
  74. @endif
  75. @endif
  76. </td>
  77. </tr>
  78. @endforeach
  79. @endif
  80. </tbody>
  81. </table>
  82. <div class="row">
  83. <div class="col-sm-6">
  84. <div class="dataTables_info" id="DataTables_Table_0_info"
  85. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  86. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  87. </div>
  88. </div>
  89. <div class="col-sm-6">
  90. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  91. {!! $list->setPath('')->appends(Request::all())->render() !!}
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. @endsection