users.blade.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. @extends('hello')
  2. @section('content')
  3. <div class="page-header"><h1>Benutzerverwaltung</h1></div>
  4. {{$users->links()}}
  5. <table class="table">
  6. <tr>
  7. <th></th>
  8. <th>Name</th>
  9. <th>Email</th>
  10. <th>Filme</th>
  11. <th>Kommentare</th>
  12. <th>Aktion</th>
  13. </tr>
  14. @foreach($users as $user)
  15. <tr>
  16. <td><img class="img-circle" src="{{$user->getAvatar()}}" width="32"></td>
  17. <td>{{$user->name}}</td>
  18. <td>{{$user->email}}</td>
  19. <td>{{$user->films()->count()}}</td>
  20. <td>{{$user->comments()->count()}}</td>
  21. <td>
  22. @if($user->admin)
  23. @if($user->name != "Daniel")
  24. <button class="btn btn-primary btn-xs" type="button">Admin</button>
  25. <a class="btn btn-default btn-xs" type="button" href="{{ url('users/rmadm/' . $user->id) }}">Rechte entziehen</a>
  26. @else
  27. &mdash;
  28. @endif
  29. @else
  30. @if(!$user->getSetting("disabled"))
  31. <a class="btn btn-default btn-xs" type="button" href="{{ url("users/inact/" . $user->id) }}">Deaktivieren</a>
  32. @else
  33. <a class="btn btn-default btn-xs" type="button" href="{{ url("users/act/" . $user->id) }}">Aktivieren</a>
  34. @endif
  35. <a class="btn btn-default btn-xs" type="button" href="{{ url('users/mkadm/' . $user->id) }}">Zum Admin machen</a>
  36. <a class="btn btn-danger btn-xs" type="button" href="{{ url('users/rmusr/' . $user->id) }}">Löschen</a>
  37. @endif
  38. </td>
  39. </tr>
  40. @endforeach
  41. </table>
  42. {{$users->links()}}
  43. @stop
  44. @section('title')
  45. Benutzerverwaltung ~
  46. @stop