index.blade.php 6.6 KB

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