stats.blade.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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(); $prop = $stat['prop']; ?>
  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->$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->$prop->getPoster()}}" height="47">
  20. </div>
  21. @endif
  22. <div class="media-body">
  23. <h4 class="media-heading">{{is_object($top->$prop) ? $top->$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. <?php $prop = $stat['prop']; ?>
  29. <div style="margin-top: 10px;">
  30. @if($stat['type'] === "User")
  31. <div class="pull-left" style="margin-right:5px">
  32. <img class="img-circle media-object" src="{{$top->$prop->getAvatar()}}" width="20">
  33. </div>
  34. @endif
  35. @if($stat['type'] === "Film")
  36. <div class="pull-left" style="margin-right:5px">
  37. <img class="media-object" src="{{$top->$prop->getPoster()}}" height="20">
  38. </div>
  39. @endif
  40. <div class="media-body">
  41. <h5 class="media-heading">{{$top->$prop->name}} &mdash; <b>{{$top->count}}</b> {{$top->count ==1 ? $stat['entr'][0] : $stat['entr'][1] }}</h5>
  42. </div>
  43. </div>
  44. @endforeach
  45. </div>
  46. </div>
  47. </div>
  48. @endforeach
  49. </div>
  50. @stop
  51. @section('title')
  52. Statistiken ~
  53. @stop
  54. @section('script')
  55. @stop