index.blade.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. @extends('hello');
  2. @section('content')
  3. <div class="row">
  4. <div class="col-md-6">
  5. <div class="panel panel-info">
  6. <div class="panel-heading">Meistgew&uuml;nschter Film</div>
  7. <div class="panel-body">
  8. <img src="{{$image}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  9. <h4>{{$topfilm->name}}</h4>
  10. <p><span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;{{$topfilm->upvotes}}
  11. <span class="glyphicon glyphicon-tree-conifer"></span>&nbsp;{{$topfilm->downvotes + $topfilm->upvotes}}</p>
  12. @if(!is_null(Auth::user()) && Auth::user()->admin)
  13. <a href='{{ url('view-next/' . $topfilm->id) }}' class='btn btn-success btn-xs'>Als n&auml;chstes sehen</a>
  14. @endif
  15. </div>
  16. <div class="list-group">
  17. {{ link_to_route('film', "Filmdetails", array($topfilm->id), array('class' => 'list-group-item'))}}
  18. {{ link_to('beliebt', 'Mehr beliebte Filme', array('class' => 'list-group-item')); }}
  19. </div>
  20. </div>
  21. </div>
  22. <div class="col-md-6">
  23. <div class="panel panel-primary">
  24. <div class="panel-heading">N&auml;chster Film</div>
  25. <div class="panel-body">
  26. <img src="{{$nimage}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  27. <h4>{{is_object($nextfilm) ? $nextfilm->name : "Steht nicht fest"}}</h4>
  28. @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>
  29. @endif
  30. </div>
  31. @if(is_object($nextfilm))
  32. <div class="list-group">
  33. {{ link_to_route('film', "Filmdetails", array($nextfilm->id), array('class' => 'list-group-item'))}}
  34. </div>
  35. @endif
  36. </div>
  37. </div>
  38. </div>
  39. <div class="row">
  40. <div class="col-md-6">
  41. <div class="panel panel-success">
  42. <div class="panel-heading">Neue Vorschl&auml;ge</div>
  43. <div class="list-group">
  44. @foreach ($vorgeschlagen as $film)
  45. <a href="{{ route('film', array($film->id)); }}" class="list-group-item">{{$film->name}} <small>({{ $film->besitzer->name }})</small></a>
  46. @endforeach
  47. {{ link_to('vorgeschlagen', 'Mehr...', array('class' => 'list-group-item')); }}
  48. </div>
  49. </div>
  50. </div>
  51. <div class="col-md-6">
  52. <div class="panel panel-danger">
  53. <div class="panel-heading">Gesehene Filme</div>
  54. <div class="list-group">
  55. @foreach ($gesehen as $film)
  56. {{ link_to_route('film', $film->name, array($film->id), array('class' => 'list-group-item'))}}
  57. @endforeach
  58. {{ link_to('gesehen', 'Mehr...', array('class' => 'list-group-item')); }}
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="row">
  64. <div class="col-md-6">
  65. <div class="panel-group" id="accordion">
  66. @foreach ($news as $new)
  67. <div class="panel panel-warning">
  68. <div class="panel-heading">
  69. <h4 class="panel-title">
  70. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#news{{$new->id}}">{{$new->headline}}</a>
  71. <small>{{$new->ersteller->name}} - {{\Carbon\Carbon::parse($new->updated_at)->format('d.m.Y')}}</small>
  72. </h4>
  73. </div>
  74. <div id="news{{$new->id}}" class="panel-collapse collapse">
  75. <div class="panel-body">{{nl2br(htmlentities($new->body))}}</div>
  76. </div>
  77. </div>
  78. @endforeach
  79. </div>
  80. </div>
  81. <div class="col-md-6">
  82. <div class="panel panel-default">
  83. <div class="panel-heading">Letzte Kommentare</div>
  84. <div class="list-group">
  85. @foreach ($kommentare as $kommentar)
  86. <a href="{{ url("film/" . $kommentar->film) }}" class="list-group-item">
  87. <h6 class='list-group-item-heading'>{{$kommentar->autor->name}}
  88. <small>in {{ $kommentar->objekt->name }}</small>
  89. </h6>
  90. <p class='list-group-item-text'>
  91. {{ $kommentar->text }}
  92. </p>
  93. </a>
  94. @endforeach
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. @stop