home.blade.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @extends('admin.partial.template-full')
  2. @section('header')
  3. <div class="bg-primary">
  4. <div class="container">
  5. <div class="my-5">test</div>
  6. </div>
  7. </div>
  8. @endsection
  9. @section('section')
  10. <div class="title">
  11. <h3 class="font-weight-bold">Users</h3>
  12. </div>
  13. <hr>
  14. <div class="table-responsive">
  15. <table class="table">
  16. <thead class="bg-light">
  17. <tr class="text-center">
  18. <th scope="col" class="border-0" width="10%">
  19. <span>ID</span>
  20. </th>
  21. <th scope="col" class="border-0" width="30%">
  22. <span>Username</span>
  23. </th>
  24. <th scope="col" class="border-0" width="30%">
  25. <span>Actions</span>
  26. </th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. @foreach($users as $user)
  31. @if($user->status == 'deleted')
  32. <tr class="font-weight-bold text-center user-row">
  33. <th scope="row">
  34. <span class="text-danger" class="text-monospace">{{$user->id}}</span>
  35. </th>
  36. <td class="text-left">
  37. <img src="/storage/avatars/default.png?v=3" width="28px" class="rounded-circle mr-2" style="border:1px solid #ccc">
  38. <span title="{{$user->username}}" data-toggle="tooltip" data-placement="bottom">
  39. <span class="text-danger">{{$user->username}}</span>
  40. </span>
  41. </td>
  42. <td>
  43. <span class="font-weight-bold small">
  44. <span class="text-danger">Account Deleted</span>
  45. </span>
  46. </td>
  47. </tr>
  48. @else
  49. <tr class="font-weight-bold text-center user-row">
  50. <th scope="row">
  51. <span class="text-monospace">{{$user->id}}</span>
  52. </th>
  53. <td class="text-left">
  54. <img src="{{$user->profile->avatarUrl()}}" width="28px" class="rounded-circle mr-2" style="border:1px solid #ccc">
  55. <span title="{{$user->username}}" data-toggle="tooltip" data-placement="bottom">
  56. <span>{{$user->username}}</span>
  57. @if($user->is_admin)
  58. <i class="text-danger fas fa-certificate" title="Admin"></i>
  59. @endif
  60. </span>
  61. </td>
  62. <td>
  63. <span class="action-row font-weight-lighter">
  64. <a href="{{$user->url()}}" class="pr-2 text-muted small font-weight-bold" title="View Profile" data-toggle="tooltip" data-placement="bottom">
  65. Profile
  66. </a>
  67. <a href="/i/admin/users/show/{{$user->id}}" class="pr-2 text-muted small font-weight-bold" title="Profile Review" data-toggle="tooltip" data-placement="bottom">
  68. Review
  69. </a>
  70. <a href="/i/admin/users/modlogs/{{$user->id}}" class="pr-2 text-muted small font-weight-bold" title="Moderation Logs" data-toggle="tooltip" data-placement="bottom">
  71. Mod Logs
  72. </a>
  73. </span>
  74. </td>
  75. </tr>
  76. @endif
  77. @endforeach
  78. </tbody>
  79. </table>
  80. </div>
  81. <div class="d-flex justify-content-center mt-5 small">
  82. {{$users->links()}}
  83. </div>
  84. @endsection
  85. @push('styles')
  86. <style type="text/css">
  87. .user-row:hover {
  88. background-color: #eff8ff;
  89. }
  90. .user-row:hover .action-row {
  91. display: block;
  92. }
  93. .user-row:hover .last-active {
  94. display: none;
  95. }
  96. </style>
  97. @endpush
  98. @push('scripts')
  99. <script type="text/javascript">
  100. $(document).ready(function() {
  101. $('.human-size').each(function(d,a) {
  102. let el = $(a);
  103. let size = el.data('bytes');
  104. el.text(filesize(size, {round: 0}));
  105. });
  106. });
  107. </script>
  108. @endpush