stats.blade.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @extends('hello')
  2. @section('content')
  3. <div class="page-header"><h1>Statistiken</h1></div>
  4. <div class="row">
  5. @foreach($stats as $stat)
  6. <div class="col-md-4">
  7. <div class="panel panel-default">
  8. <div class="panel-heading">{{$stat["name"]}}</div>
  9. <div class="panel-body">
  10. <?php $top = $stat["vals"]->shift() ?>
  11. <div>
  12. @if($stat['type'] === "User")
  13. <div class="pull-left" style="margin-right:5px">
  14. <img class="img-circle media-object" src="{{$top->$stat['prop']->getAvatar()}}" width="47">
  15. </div>
  16. @endif
  17. @if($stat['type'] === "Film")
  18. <div class="pull-left" style="margin-right:5px">
  19. <img class="media-object" src="{{$top->$stat['prop']->getPoster()}}" height="47">
  20. </div>
  21. @endif
  22. <div class="media-body">
  23. <h4 class="media-heading">{{is_object($top->$stat['prop']) ? $top->$stat['prop']->name : dd($top)}}</h4>
  24. <b>{{$top->count}}</b> {{$top->count ==1 ? $stat['entr'][0] : $stat['entr'][1] }}
  25. </div>
  26. </div>
  27. @foreach($stat['vals'] as $top)
  28. <div style="margin-top: 10px;">
  29. @if($stat['type'] === "User")
  30. <div class="pull-left" style="margin-right:5px">
  31. <img class="img-circle media-object" src="{{$top->$stat['prop']->getAvatar()}}" width="20">
  32. </div>
  33. @endif
  34. @if($stat['type'] === "Film")
  35. <div class="pull-left" style="margin-right:5px">
  36. <img class="media-object" src="{{$top->$stat['prop']->getPoster()}}" height="20">
  37. </div>
  38. @endif
  39. <div class="media-body">
  40. <h5 class="media-heading">{{$top->$stat['prop']->name}} &mdash; <b>{{$top->count}}</b> {{$top->count ==1 ? $stat['entr'][0] : $stat['entr'][1] }}</h5>
  41. </div>
  42. </div>
  43. @endforeach
  44. </div>
  45. </div>
  46. </div>
  47. @endforeach
  48. </div>
  49. @stop
  50. @section('title')
  51. Statistiken ~
  52. @stop
  53. @section('script')
  54. @stop