index.blade.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. @extends('hello');
  2. @section('content')
  3. <div class="row">
  4. <div class="col-md-6">
  5. <div class="panel panel-primary">
  6. <div class="panel-heading">Meistgew&uuml;nschter Film</div>
  7. <div class="panel-body">
  8. <?php $topfilm = $meistgw->shift(); ?>
  9. <img src="{{$images["top"]}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  10. <h4>
  11. {{$topfilm->name}}
  12. <small><span class="badge">
  13. <img class="img-circle" src="{{ $topfilm->besitzer->getAvatar() }}" width="20"> {{$topfilm->besitzer->name}}
  14. </span></small>
  15. </h4>
  16. <p><span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;{{$topfilm->getUpvotes()}}
  17. <span class="glyphicon glyphicon-transfer"></span>&nbsp;{{$topfilm->getVotes()}}</p>
  18. {{ link_to_route('film', "Filmdetails", array($topfilm->id), array('class' => 'btn btn-info btn-xs'))}}
  19. @if(!is_null(Auth::user()) && Auth::user()->admin)
  20. <a href='{{ url('view-next/' . $topfilm->id) }}' class='btn btn-success btn-xs'>Als n&auml;chstes sehen</a>
  21. @endif
  22. </div>
  23. <div class="list-group">
  24. @foreach ($meistgw as $film)
  25. <a href="{{ route('film', array($film->id)); }}" class="list-group-item">{{$film->name}} <small><span class="badge">
  26. <img class="img-circle" src="{{ $film->besitzer->getAvatar() }}" width="16"> {{$film->besitzer->name}}
  27. </span></small></a>
  28. @endforeach
  29. <i>{{ link_to('beliebt', 'Mehr...', array('class' => 'list-group-item')); }}</i>
  30. </div>
  31. </div>
  32. <div class="panel panel-success">
  33. <div class="panel-heading">Neue Vorschl&auml;ge</div>
  34. <div class="panel-body">
  35. <?php $topfilm = $vorgeschlagen->shift(); ?>
  36. <img src="{{$images["neu"]}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  37. <h4>{{$topfilm->name}}
  38. <small><span class="badge">
  39. <img class="img-circle" src="{{ $topfilm->besitzer->getAvatar() }}" width="20"> {{$topfilm->besitzer->name}}
  40. </span></small>
  41. </h4>
  42. <p><span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;{{$topfilm->getUpvotes()}}
  43. <span class="glyphicon glyphicon-transfer"></span>&nbsp;{{$topfilm->getVotes()}}</p>
  44. {{ link_to_route('film', "Filmdetails", array($topfilm->id), array('class' => 'btn btn-info btn-xs'))}}
  45. @if(!is_null(Auth::user()) && Auth::user()->admin)
  46. <a href='{{ url('view-next/' . $topfilm->id) }}' class='btn btn-success btn-xs'>Als n&auml;chstes sehen</a>
  47. @endif
  48. </div>
  49. <div class="list-group">
  50. @foreach ($vorgeschlagen as $film)
  51. <a href="{{ route('film', array($film->id)); }}" class="list-group-item">{{$film->name}} <small><span class="badge">
  52. <img class="img-circle" src="{{ $film->besitzer->getAvatar() }}" width="15"> {{$film->besitzer->name}}
  53. </span></small></a>
  54. @endforeach
  55. <i>{{ link_to('vorgeschlagen', 'Mehr...', array('class' => 'list-group-item')); }}</i>
  56. </div>
  57. </div>
  58. <div class="panel-group" id="accordion">
  59. @foreach ($news as $new)
  60. <div class="panel panel-info">
  61. <div class="panel-heading">
  62. <h4 class="panel-title">
  63. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#news{{$new->id}}">{{$new->headline}}</a>
  64. <small>
  65. <span class="badge">
  66. <img class="img-circle" src="{{ $new->ersteller->getAvatar() }}" width="16"> {{$new->ersteller->name}}
  67. </span> - {{\Carbon\Carbon::parse($new->updated_at)->format('d.m.Y')}}</small>
  68. </h4>
  69. </div>
  70. <div id="news{{$new->id}}" class="panel-collapse collapse {{$new === $news[0] ? "in" : ""}}">
  71. <div class="panel-body">{{nl2br(htmlentities($new->body))}}</div>
  72. </div>
  73. </div>
  74. @endforeach
  75. </div>
  76. </div>
  77. <div class="col-md-6">
  78. <div class="panel panel-primary">
  79. <div class="panel-heading">N&auml;chster Film</div>
  80. <div class="panel-body">
  81. <img src="{{$images["next"]}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  82. <h4>{{is_object($nextfilm) ? $nextfilm->name . " <small><i>(" . $nextfilm->besitzer->name . ")</i></small>" : "Steht nicht fest"}}</h4>
  83. @if(is_object($nextfilm)) {{ link_to_route('film', "Filmdetails", array($nextfilm->id), array('class' => 'btn btn-info btn-xs'))}}
  84. @endif
  85. @if(is_object($nextfilm) && !is_null(Auth::user()) && Auth::user()->admin) <a href='{{ url('mark-read/' . $nextfilm->id) }}' class='btn btn-success btn-xs'>Gesehen</a>
  86. @endif
  87. </div>
  88. </div>
  89. <div class="panel panel-default">
  90. <div class="panel-heading">Letzte Kommentare</div>
  91. <div class="list-group">
  92. @foreach ($kommentare as $kommentar)
  93. <a href="{{ url("film/" . $kommentar->film) }}" class="list-group-item">
  94. <h6 class='list-group-item-heading'>{{$kommentar->autor->name}}
  95. <small>in {{ $kommentar->objekt->name }}</small>
  96. </h6>
  97. <p class='list-group-item-text'>
  98. {{ $kommentar->text }}
  99. </p>
  100. </a>
  101. @endforeach
  102. </div>
  103. </div>
  104. <div class="panel panel-danger">
  105. <div class="panel-heading">Gesehene Filme</div>
  106. <div class="panel-body">
  107. <?php $topfilm = $gesehen->shift(); ?>
  108. <img src="{{$images["alt"]}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  109. <h4>{{$topfilm->name}}
  110. <small><span class="badge">
  111. <img class="img-circle" src="{{ $topfilm->besitzer->getAvatar() }}" width="20"> {{$topfilm->besitzer->name}}
  112. </span></small></h4>
  113. <p>Bewertung:
  114. @if($topfilm->getBewertung() > 0)
  115. <span class="label label-{{$labels[round($topfilm->getBewertung())]}}">{{$topfilm->getBewertung()}}</span>
  116. @else
  117. &mdash;
  118. @endif
  119. </p>
  120. <p>{{ link_to_route('film', "Filmdetails", array($topfilm->id), array('class' => 'btn btn-info btn-xs'))}}</p>
  121. </div>
  122. <div class="list-group">
  123. @foreach ($gesehen as $film)
  124. <a href="{{ route('film', array($film->id)); }}" class="list-group-item">{{$film->name}} <small><span class="badge">
  125. <img class="img-circle" src="{{ $film->besitzer->getAvatar() }}" width="16"> {{$film->besitzer->name}}
  126. </span></small></a>
  127. @endforeach
  128. <i>{{ link_to('gesehen', 'Mehr...', array('class' => 'list-group-item')); }}</i>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. @stop