film.blade.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @extends('hello')
  2. @section('content')
  3. <div class="page-header">
  4. <h1>{{ $film->name }} <small>{{ $tfilm['tagline']}}</small></h1>
  5. </div>
  6. <div class="row">
  7. <div class="col-md-3">
  8. @if(!is_null($film->gesehen))
  9. <div class="label label-success"><span class="glyphicon glyphicon-check"></span> Gesehen am {{ $film->gesehen }}</div>
  10. @else
  11. <div class="label label-danger"><span class="glyphicon glyphicon-unchecked"></span> Nicht gesehen</div>
  12. @endif
  13. </div>
  14. <div class="col-md-9">
  15. <ul class="nav nav-tabs">
  16. <li class="active"><a href="#ueberblick" data-toggle="tab">Überblick</a></li>
  17. <li><a href="#cast" data-toggle="tab">Schauspieler</a></li>
  18. <li><a href="#trailer" data-toggle="tab">Trailer</a></li>
  19. </ul>
  20. </div>
  21. </div>
  22. <div class="row">
  23. <div class="col-md-3 thumbnail">
  24. <img src="{{ $poster }}" alt="{{ $film->name }} Poster">
  25. </div>
  26. <div class="col-md-9 tab-content">
  27. <div class="tab-pane active" id='ueberblick'>
  28. <div class="pull-right">
  29. <a class="btn btn-xs btn-primary" href="http://themoviedb.org/movie/{{ $film->tvdbid }}">themoviedb.org</a>
  30. <a class="btn btn-xs btn-warning" href="http://imdb.com/title/{{ $tfilm['imdb_id'] }}">IMDB</a>
  31. </div>
  32. <dl class="dl-horizontal">
  33. <dt>Originaltitel</dt>
  34. <dd>{{ $tfilm['original_title'] }}</dd>
  35. <dt>Erschienen</dt>
  36. <dd>
  37. {{ $tfilm['release_date']}} -
  38. @foreach($tfilm['production_countries'] as $pc)
  39. <abbr title="{{$pc['name']}}">{{$pc['iso_3166_1']}}</abbr>
  40. @endforeach
  41. @foreach($tfilm['production_companies'] as $pc)
  42. - {{$pc['name']}}
  43. @endforeach
  44. </dd>
  45. <dt>Genre</dt>
  46. <dd>
  47. @foreach($tfilm['genres'] as $g)
  48. <span class="label label-default">{{$g['name']}}</span>
  49. @endforeach
  50. </dd>
  51. <dt>Bewertung</dt>
  52. <dd>{{ $tfilm['vote_average']}} von 10
  53. </dd>
  54. @for($i = 0; $i < 3 && $i < count($cast['crew']); $i++)
  55. <dt>{{$cast['crew'][$i]['job']}}</dt>
  56. <dd>{{$cast['crew'][$i]['name']}}</dd>
  57. @endfor
  58. <p></p>
  59. <dt>Inhalt</dt>
  60. <dd>{{ $tfilm['overview'] }}</dd>
  61. </dl>
  62. </div>
  63. <div class="tab-pane" id="cast">
  64. <div class="row" style="margin-top:10px;">
  65. @for($i = 0; $i < 10 && $i < count($cast['cast']); $i++)
  66. <div class="col-md-6">
  67. <div class="pull-left" style="margin-right:5px; min-height: 80px;"><img class="img-thumbnail media-object" src="{{ !is_null($cast['cast'][$i]['profile_path']) ? $tmdb->getImageUrl($cast['cast'][$i]['profile_path'], TMDb::IMAGE_PROFILE, 'w185') : "http://d3a8mw37cqal2z.cloudfront.net/assets/649ae87ebcf4285/images/no-profile-w185.jpg"}}" alt="{{$cast['cast'][$i]['name']}}" width="55"></div>
  68. <div class="media-body">
  69. <h4 class="media-heading">{{$cast['cast'][$i]['name']}}</h4>
  70. {{$cast['cast'][$i]['character']}}
  71. </div>
  72. </div>
  73. @if($i % 2 == 1)
  74. </div><div class="row">
  75. @endif
  76. @endfor
  77. </div>
  78. </div>
  79. <div class="tab-pane" id="trailer">
  80. @foreach($trail['youtube'] as $yt)
  81. <iframe width="420" height="315" src="//www.youtube.com/embed/{{ $yt['source'] }}" frameborder="0" allowfullscreen></iframe>
  82. @endforeach
  83. </div>
  84. </div>
  85. </div>
  86. <div class="clearfix"></div>
  87. <hr>
  88. @if($votes > 0)
  89. <h2>Abstimmung</h2>
  90. <p>Insgesamt haben <b>{{$votes}}</b> Personen abgestimmt. <b>{{$vposi}}</b> davon waren <i>dafür</i>.
  91. <div class="progress">
  92. <div class="progress-bar progress-bar-success" style="width: {{ $vposi / $votes * 100}}%">
  93. <span class="sr-only">{{$vposi}} von {{$votes}} (dafür)</span>
  94. </div>
  95. <div class="progress-bar progress-bar-danger" style="width: 10%">
  96. <span class="sr-only">{{ $votes - $vposi}} von {{ $votes }} Complete (dagegen)</span>
  97. </div>
  98. </div>
  99. <hr>@endif
  100. <h2>Kommentare</h2>
  101. <p>Melde Dich an, um diesen Film zu kommentieren.</p>
  102. @foreach($comments as $comment)
  103. <div class="media">
  104. <a class="pull-left" href="#">
  105. <img class="media-object" src="{{ "http://www.gravatar.com/avatar/" . md5( strtolower( trim( $comment->autor->email ) ) ) . "?s=40" }}" alt="{{ $comment->autor->name }}">
  106. </a>
  107. <div class="media-body">
  108. <h4 class="media-heading">{{ $comment->autor->name }} <small>{{$comment->updated_at}}</small></h4>
  109. {{$comment->text}}
  110. </div>
  111. </div>
  112. @endforeach
  113. @stop
  114. @section('title')
  115. {{ $film->name }} ~
  116. @stop