index.blade.php 6.6 KB

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