index.blade.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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" style="padding-bottom: 2px">
  94. <h6 class='list-group-item-heading'><span class="badge">
  95. <img class="img-circle" src="{{ $kommentar->autor->getAvatar() }}" width="16"> {{$kommentar->autor->name}}
  96. </span>
  97. <small>in</small> <i>{{ $kommentar->objekt->name }}</i>
  98. </h6></a>
  99. <p class='panel-body' style="padding-top: 0; padding-bottom: 3px; ">
  100. @if($kommentar->bewertung > 0)
  101. <small>Hat den Film mit <span class="label label-{{$labels[round($kommentar->bewertung)]}}">{{$kommentar->bewertung}}</span> bewertet.</small><br>
  102. @endif
  103. {{ $kommentar->text }}
  104. </p>
  105. <hr style="padding: 0; margin: 0">
  106. @endforeach
  107. </div>
  108. </div>
  109. <div class="panel panel-danger">
  110. <div class="panel-heading">Gesehene Filme</div>
  111. <div class="panel-body">
  112. <?php $topfilm = $gesehen->shift(); ?>
  113. <img src="{{$images["alt"]}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  114. <h4>{{$topfilm->name}}
  115. <small><span class="badge">
  116. <img class="img-circle" src="{{ $topfilm->besitzer->getAvatar() }}" width="20"> {{$topfilm->besitzer->name}}
  117. </span></small></h4>
  118. <p>Bewertung:
  119. @if($topfilm->getBewertung() > 0)
  120. <span class="label label-{{$labels[round($topfilm->getBewertung())]}}">{{$topfilm->getBewertung()}}</span>
  121. @else
  122. &mdash;
  123. @endif
  124. </p>
  125. <p>{{ link_to_route('film', "Filmdetails", array($topfilm->id), array('class' => 'btn btn-info btn-xs'))}}</p>
  126. </div>
  127. <div class="list-group">
  128. @foreach ($gesehen as $film)
  129. <a href="{{ route('film', array($film->id)); }}" class="list-group-item">{{$film->name}} <small><span class="badge">
  130. <img class="img-circle" src="{{ $film->besitzer->getAvatar() }}" width="16"> {{$film->besitzer->name}}
  131. </span></small></a>
  132. @endforeach
  133. <i>{{ link_to('gesehen', 'Mehr...', array('class' => 'list-group-item')); }}</i>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. @stop