index.blade.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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 class="panel panel-warning">
  103. <div class="panel-heading">Abgelehnte Filme</div>
  104. <div class="panel-body">
  105. <?php $topfilm = $abgelehnt->shift(); ?>
  106. <img src="{{$images["declined"]}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  107. <h4>{{$topfilm->name}}
  108. <small><span class="badge">
  109. <img class="img-circle" src="{{ $topfilm->besitzer->getAvatar() }}" width="20"> {{$topfilm->besitzer->name}}
  110. </span></small></h4>
  111. <p>Bewertung:
  112. @if($topfilm->getBewertung() > 0)
  113. <span class="label label-{{$labels[round($topfilm->getBewertung())]}}">{{$topfilm->getBewertung()}}</span>
  114. @else
  115. &mdash;
  116. @endif
  117. </p>
  118. <p>{{ link_to_route('film', "Filmdetails", array($topfilm->id), array('class' => 'btn btn-info btn-xs'))}}</p>
  119. </div>
  120. <div class="list-group">
  121. @foreach ($abgelehnt as $film)
  122. <a href="{{ route('film', array($film->id)); }}" class="list-group-item">{{$film->name}} <small><span class="badge">
  123. <img class="img-circle" src="{{ $film->besitzer->getAvatar() }}" width="16"> {{$film->besitzer->name}}
  124. </span></small></a>
  125. @endforeach
  126. <i>{{ link_to('abgelehnt', 'Mehr...', array('class' => 'list-group-item')); }}</i>
  127. </div>
  128. </div>
  129. </div>
  130. <div class="col-md-6">
  131. <div class="panel panel-default">
  132. <div class="panel-heading">Letzte Kommentare</div>
  133. <div class="list-group">
  134. @foreach ($kommentare as $kommentar)
  135. <a href="{{ url("film/" . $kommentar->film) }}" class="list-group-item" style="padding-bottom: 2px">
  136. <h6 class='list-group-item-heading'><span class="badge">
  137. <img class="img-circle" src="{{ $kommentar->autor->getAvatar() }}" width="16"> {{$kommentar->autor->name}}
  138. </span>
  139. <small>in</small> <i>{{ $kommentar->objekt->name }}</i>
  140. </h6></a>
  141. <p class='panel-body' style="padding-top: 0; padding-bottom: 3px; ">
  142. @if($kommentar->bewertung > 0)
  143. <small>Hat den Film mit <span class="label label-{{$labels[round($kommentar->bewertung)]}}">{{$kommentar->bewertung}}</span> bewertet.</small><br>
  144. @endif
  145. {{ $kommentar->text }}
  146. </p>
  147. <hr style="padding: 0; margin: 0">
  148. @endforeach
  149. </div>
  150. </div>
  151. <div class="panel-group" id="accordion">
  152. @foreach ($news as $new)
  153. <div class="panel panel-info">
  154. <div class="panel-heading">
  155. <h4 class="panel-title">
  156. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#news{{$new->id}}">{{$new->headline}}</a>
  157. <small>
  158. <span class="badge">
  159. <img class="img-circle" src="{{ $new->ersteller->getAvatar() }}" width="16"> {{$new->ersteller->name}}
  160. </span> - {{\Carbon\Carbon::parse($new->updated_at)->format('d.m.Y')}}</small>
  161. </h4>
  162. </div>
  163. <div id="news{{$new->id}}" class="panel-collapse collapse {{$new === $news[0] ? "in" : ""}}">
  164. <div class="panel-body">{{nl2br(htmlentities($new->body))}}</div>
  165. </div>
  166. </div>
  167. @endforeach
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. @stop