index.blade.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. @extends('layouts.main')
  2. @section('content')
  3. <!-- CONTENT HEADER -->
  4. <section class="content-header">
  5. <div class="container-fluid">
  6. <div class="row mb-2">
  7. <div class="col-sm-6">
  8. <h1>Users</h1>
  9. </div>
  10. <div class="col-sm-6">
  11. <ol class="breadcrumb float-sm-right">
  12. <li class="breadcrumb-item"><a href="{{route('home')}}">Dashboard</a></li>
  13. <li class="breadcrumb-item"><a class="text-muted" href="{{route('admin.users.index')}}">Users</a></li>
  14. </ol>
  15. </div>
  16. </div>
  17. </div>
  18. </section>
  19. <!-- END CONTENT HEADER -->
  20. <!-- MAIN CONTENT -->
  21. <section class="content">
  22. <div class="container-fluid">
  23. <div class="card">
  24. <div class="card-header">
  25. <div class="d-flex justify-content-between">
  26. <h5 class="card-title"><i class="fas fa-users mr-2"></i>Users</h5>
  27. <a href="{{route('admin.users.notifications')}}" class="btn btn-sm btn-primary"><i
  28. class="fas fa-paper-plane mr-1"></i>Notify</a>
  29. </div>
  30. </div>
  31. <div class="card-body table-responsive">
  32. <table id="datatable" class="table table-striped">
  33. <thead>
  34. <tr>
  35. <th>discordId</th>
  36. <th>ip</th>
  37. <th>pterodactyl_id</th>
  38. <th>Avatar</th>
  39. <th>Name</th>
  40. <th>Role</th>
  41. <th>Email</th>
  42. <th>{{CREDITS_DISPLAY_NAME}}</th>
  43. <th>Servers</th>
  44. <th>Verified</th>
  45. <th>Last seen</th>
  46. <th></th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. </tbody>
  51. </table>
  52. </div>
  53. </div>
  54. </div>
  55. <!-- END CUSTOM CONTENT -->
  56. </section>
  57. <!-- END CONTENT -->
  58. <script>
  59. function submitResult() {
  60. return confirm("Are you sure you wish to delete?") !== false;
  61. }
  62. document.addEventListener("DOMContentLoaded", function () {
  63. $('#datatable').DataTable({
  64. processing: true,
  65. serverSide: true,
  66. stateSave: true,
  67. ajax: "{{route('admin.users.datatable')}}",
  68. order: [[ 11, "desc" ]],
  69. columns: [
  70. {data: 'discordId', visible: false, name: 'discordUser.id'},
  71. {data: 'pterodactyl_id', visible: false},
  72. {data: 'ip', visible: false},
  73. {data: 'avatar' , sortable : false},
  74. {data: 'name'},
  75. {data: 'role'},
  76. {data: 'email', name: 'users.email'},
  77. {data: 'credits' , name : 'users.credits'},
  78. {data: 'servers' , sortable : false},
  79. {data: 'verified' , sortable : false},
  80. {data: 'last_seen'},
  81. {data: 'actions' , sortable : false},
  82. ],
  83. fnDrawCallback: function( oSettings ) {
  84. $('[data-toggle="popover"]').popover();
  85. }
  86. });
  87. });
  88. </script>
  89. @endsection