userBanHistory.blade.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h3 class="panel-title">用户封禁记录</h3>
  10. </div>
  11. <div class="panel-body">
  12. <div class="form-row">
  13. <div class="form-group col-lg-3 col-sm-6">
  14. <input type="text" class="form-control" name="email" id="email" value="{{Request::input('email')}}" placeholder="用户名"/>
  15. </div>
  16. <div class="form-group col-lg-2 col-sm-6 btn-group">
  17. <button class="btn btn-primary" onclick="Search()">搜 索</button>
  18. <a href="{{route('admin.log.ban')}}" class="btn btn-danger">重 置</a>
  19. </div>
  20. </div>
  21. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  22. <thead class="thead-default">
  23. <tr>
  24. <th> #</th>
  25. <th> 用户名</th>
  26. <th> 时长</th>
  27. <th> 理由</th>
  28. <th> 封禁时间</th>
  29. <th> 最后连接时间</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @foreach($list as $vo)
  34. <tr>
  35. <td>
  36. {{$vo->id}}
  37. </td>
  38. <td>
  39. @if ($vo->user)
  40. <a href="{{route('admin.user.index', ['email'=>$vo->user->email])}}" target="_blank"> {{$vo->user->email}}</a>
  41. @else
  42. 【账号已删除】
  43. @endif
  44. </td>
  45. <td> {{$vo->time}}分钟</td>
  46. <td> {{$vo->description}} </td>
  47. <td> {{$vo->created_at}} </td>
  48. <td> {{date("Y-m-d H:i:s", $vo->user->t)}} </td>
  49. </tr>
  50. @endforeach
  51. </tbody>
  52. </table>
  53. </div>
  54. <div class="panel-footer">
  55. <div class="row">
  56. <div class="col-sm-4">
  57. 共 <code>{{$list->total()}}</code> 条记录
  58. </div>
  59. <div class="col-sm-8">
  60. <nav class="Page navigation float-right">
  61. {{$list->links()}}
  62. </nav>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. @endsection
  69. @section('script')
  70. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  71. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  72. <script type="text/javascript">
  73. //回车检测
  74. $(document).on('keypress', 'input', function(e) {
  75. if (e.which === 13) {
  76. Search();
  77. return false;
  78. }
  79. });
  80. // 搜索
  81. function Search() {
  82. window.location.href = '{{route('admin.log.ban')}}?email=' + $('#email').val();
  83. }
  84. </script>
  85. @endsection