index.blade.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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-thumbs-down"></span>&nbsp;{{$topfilm->downvotes}}</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. </div>
  19. </div>
  20. </div>
  21. <div class="col-md-6">
  22. <div class="panel panel-primary">
  23. <div class="panel-heading">N&auml;chster Film</div>
  24. <div class="panel-body">
  25. <img src="{{$nimage}}" class="pull-left thumbnail" style="max-height: 100px; margin-right: 15px;">
  26. <h4>{{is_object($nextfilm) ? $nextfilm->name : "Steht nicht fest"}}</h4>
  27. @if(is_object($nextfilm)) <a href='{{ url('mark-read/' . $nextfilm->id) }}' class='btn btn-success btn-xs'>Gesehen</a>
  28. @endif
  29. </div>
  30. @if(is_object($nextfilm))
  31. <div class="list-group">
  32. {{ link_to_route('film', "Filmdetails", array($nextfilm->id), array('class' => 'list-group-item'))}}
  33. </div>
  34. @endif
  35. </div>
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="col-md-6">
  40. <div class="panel panel-success">
  41. <div class="panel-heading">Neue Vorschl&auml;ge</div>
  42. <div class="list-group">
  43. @foreach ($vorgeschlagen as $film)
  44. {{ link_to_route('film', $film->name, array($film->id), array('class' => 'list-group-item'))}}
  45. @endforeach
  46. </div>
  47. </div>
  48. </div>
  49. <div class="col-md-6">
  50. <div class="panel panel-danger">
  51. <div class="panel-heading">Gesehene Filme</div>
  52. <div class="list-group">
  53. @foreach ($gesehen as $film)
  54. {{ link_to_route('film', $film->name, array($film->id), array('class' => 'list-group-item'))}}
  55. @endforeach
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <div class="row">
  61. <div class="col-md-6">
  62. <div class="panel-group" id="accordion">
  63. @foreach ($news as $new)
  64. <div class="panel panel-warning">
  65. <div class="panel-heading">
  66. <h4 class="panel-title">
  67. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#news{{$new->id}}">{{$new->headline}}</a>
  68. <small>{{$new->ersteller->name}} - {{\Carbon\Carbon::parse($new->updated_at)->format('d.m.Y')}}</small>
  69. </h5>
  70. </div>
  71. <div id="news{{$new->id}}" class="panel-collapse collapse">
  72. <div class="panel-body">{{nl2br(htmlentities($new->body))}}</div>
  73. </div>
  74. </div>
  75. @endforeach
  76. </div>
  77. </div>
  78. <div class="col-md-6">
  79. <div class="panel panel-default">
  80. <div class="panel-heading">Letzte Kommentare</div>
  81. <div class="list-group">
  82. @foreach ($kommentare as $kommentar)
  83. <a href="{{ url("film/" . $kommentar->film) }}" class="list-group-item">
  84. <h6 class='list-group-item-heading'>{{$kommentar->autor->name}}
  85. <small>in {{ $kommentar->objekt->name }}</small>
  86. </h6>
  87. <p class='list-group-item-text'>
  88. {{ substr($kommentar->text, 0, 55)}}<?php if(strlen($kommentar->text) > 55) echo "..." ?>
  89. </p>
  90. </a>
  91. @endforeach
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. @stop