users.blade.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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-warning btn-xs" type="button" href="{{ url('users/rmadm/' . $user->id) }}">Rechte entziehen</a>
  26. @else
  27. &mdash;
  28. @endif
  29. @else
  30. <a class="btn btn-default btn-xs" type="button" href="{{ url('users/mkadm/' . $user->id) }}">Zum Admin machen</a>
  31. <a class="btn btn-danger btn-xs" type="button" href="{{ url('users/rmusr/' . $user->id) }}">Löschen</a>
  32. @endif
  33. </td>
  34. </tr>
  35. @endforeach
  36. </table>
  37. {{$users->links()}}
  38. @stop
  39. @section('title')
  40. Benutzerverwaltung ~
  41. @stop