123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- @extends('hello')
- @section('content')
- <div class="page-header">
- <h1>{{ $film->name }} <small>{{ $tfilm['tagline']}}</small></h1>
- </div>
- <div class="row">
- <div class="col-md-3">
- @if(!is_null($film->gesehen))
- <div class="label label-success"><span class="glyphicon glyphicon-check"></span> Gesehen am {{ \Carbon\Carbon::parse($film->gesehen)->format('d.m.Y') }}</div>
- @else
- <div class="label label-danger" <?php if(!is_null(Auth::user()) && Auth::user()->admin) { echo "id='gesehen'"; } ?> style="cursor: pointer;"><span class="glyphicon glyphicon-unchecked"></span> Nicht gesehen</div>
- @endif
- </div>
- <div class="col-md-9">
- <ul class="nav nav-tabs">
- <li class="active"><a href="#ueberblick" data-toggle="tab">Überblick</a></li>
- <li><a href="#cast" data-toggle="tab">Schauspieler</a></li>
- <li><a href="#trailer" data-toggle="tab">Trailer</a></li>
- </ul>
- </div>
- </div>
- <div class="row">
- <div class="col-md-3 thumbnail">
- <img src="{{ $poster }}" alt="{{ $film->name }} Poster">
- </div>
- <div class="col-md-9 tab-content">
- <div class="tab-pane active" id='ueberblick'>
- <div class="pull-right">
- <a class="btn btn-xs btn-primary" href="http://themoviedb.org/movie/{{ $film->tvdbid }}">themoviedb.org</a>
- <a class="btn btn-xs btn-warning" href="http://imdb.com/title/{{ $tfilm['imdb_id'] }}">IMDB</a>
- </div>
- <dl class="dl-horizontal">
- <dt>Originaltitel</dt>
- <dd>{{ $tfilm['original_title'] }}</dd>
- <dt>Erschienen</dt>
- <dd>
- {{ \Carbon\Carbon::parse($tfilm['release_date'])->format('d.m.Y')}} -
- @foreach($tfilm['production_countries'] as $pc)
- <abbr title="{{$pc['name']}}">{{$pc['iso_3166_1']}}</abbr>
- @endforeach
- @foreach($tfilm['production_companies'] as $pc)
- - {{$pc['name']}}
- @endforeach
- </dd>
- <dt>Genre</dt>
- <dd>
- @foreach($tfilm['genres'] as $g)
- <span class="label label-default">{{$g['name']}}</span>
- @endforeach
- </dd>
- <dt>Bewertung</dt>
- <dd>{{ $tfilm['vote_average']}} von 10
- </dd>
- @for($i = 0; $i < 3 && $i < count($cast['crew']); $i++)
- <dt>{{$cast['crew'][$i]['job']}}</dt>
- <dd>{{$cast['crew'][$i]['name']}}</dd>
- @endfor
- <p></p>
- <dt>Inhalt</dt>
- <dd>{{ nl2br($tfilm['overview']) }}</dd>
- </dl>
- </div>
- <div class="tab-pane" id="cast">
- <div class="row" style="margin-top:10px;">
- @for($i = 0; $i < 10 && $i < count($cast['cast']); $i++)
- <div class="col-md-6">
- <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>
- <div class="media-body">
- <h4 class="media-heading">{{$cast['cast'][$i]['name']}}</h4>
- {{$cast['cast'][$i]['character']}}
- </div>
- </div>
- @if($i % 2 == 1)
- </div><div class="row">
- @endif
- @endfor
- </div>
- </div>
- <div class="tab-pane" id="trailer">
- @foreach($trail['youtube'] as $yt)
- <iframe width="420" height="315" src="//www.youtube.com/embed/{{ $yt['source'] }}" frameborder="0" allowfullscreen></iframe>
- @endforeach
- </div>
- </div>
- </div>
- <div class="clearfix"></div>
- <hr>
- @if($votes > 0 || is_null($film->gesehen))
- @if($votes > 0)
- <h2>Abstimmung</h2>
- <p>Insgesamt haben <b>{{$votes}}</b> Personen abgestimmt. <b>{{$vposi}}</b> davon waren <i>dafür</i>. @if($uvote[0])
- Du hast <i>{{ $uvote[1] ? "dafür" : "dagegen"}}</i> gestimmt.
- @endif
- <div class="progress">
- <div class="progress-bar progress-bar-success tooltip-enable" style="width: {{ $vposi / $votes * 100}}%" data-toggle="tooltip" data-title="{{$pv}}">
- <span class="sr-only">{{$vposi}} von {{$votes}} (dafür)</span>
- </div>
- <div class="progress-bar progress-bar-danger tooltip-enable" style="width: {{ ($votes - $vposi) / $votes * 100}}%" data-toggle="tooltip" data-title="{{$nv}}">
- <span class="sr-only">{{ $votes - $vposi}} von {{ $votes }} (dagegen)</span>
- </div>
- </div>
- @endif
- @if(is_null($film->gesehen) && !is_null(Auth::user()))
- <div class="container" style="text-align: center">
- <div class="btn-group">
- <a class="btn btn-lg btn-success <?php echo $uvote[0] && $uvote[1] ? "disabled" : ""; ?>" href="{{ url('vote', array('yes', Auth::user()->id, $film->id)) }}">
- <span class="glyphicon glyphicon-thumbs-up"></span> Dafür
- </a>
- <a class="btn btn-lg btn-danger <?php echo $uvote[0] && !$uvote[1] ? "disabled" : ""; ?>" href="{{ url('vote', array('no', Auth::user()->id, $film->id)) }}">
- <span class="glyphicon glyphicon-thumbs-down"></span> Dagegen
- </a>
- </div>
- </div>
- @endif
- <hr>@endif
- <h2>Kommentare</h2>
- @if(is_null(Auth::user()))
- <p>Melde Dich an, um diesen Film zu kommentieren.</p>
- @else
- <div class="media">
- <div class="pull-left">
- <img class="media-object" src="{{ "http://www.gravatar.com/avatar/" . md5( strtolower( trim( Auth::user()->email ) ) ) . "?s=40" }}">
- </div>
- <div class="media-body">
- <h4 class="media-heading">Neuer Kommentar</h4>
- {{Form::open(array('route' => 'comment'))}}
- <input type="hidden" name="user" value="{{Auth::user()->id}}">
- <input type="hidden" name="film" value="{{$film->id}}">
- <div class="form-group"><textarea class="form-control" rows="1" name="text"></textarea></div>
- <div class="form-group"><button type="submit" class="btn btn-primary btn-xs">Absenden</button></div>
- {{Form::close()}}
- </div>
- </div>
- @endif
- @foreach($comments as $comment)
- <div class="media">
- <div class="pull-left">
- <img class="media-object" src="{{ "http://www.gravatar.com/avatar/" . md5( strtolower( trim( $comment->autor->email ) ) ) . "?s=40" }}" alt="{{ $comment->autor->name }}">
- </div>
- <div class="media-body" id="comment{{$comment->id}}">
- <h5 class="media-heading">{{ $comment->autor->name }} <small>{{\Carbon\Carbon::parse($comment->created_at)->format('d.m.Y H:i')}}
- @if($comment->updated_at != $comment->created_at)
- — Zuletzt bearbeitet: {{\Carbon\Carbon::parse($comment->updated_at)->format('d.m.Y H:i')}}
- @endif
- </small></h5>
- @if(!is_null(Auth::user()) && Auth::user()->id === $comment->autor->id)
- <div class="collapse in" data-parent="#comment{{$comment->id}}" id="comment{{$comment->id}}comment">
- <p>{{$comment->text}}</p>
- <button type="button" class="btn btn-xs" onclick="toggleComment('#comment{{$comment->id}}')">Bearbeiten</button>
- </div>
- <div class="collapse" id="comment{{$comment->id}}edit">
- {{Form::open(array('route' => 'modcomment'))}}
- <input type="hidden" name="id" value="{{$comment->id}}">
- <div class="form-group"><textarea class="form-control" rows="1" name="text">{{$comment->text}}</textarea></div>
- <div class="form-group">
- <button type="submit" class="btn btn-primary btn-xs">Absenden</button>
- <button type="button" class="btn btn-xs" onclick="toggleComment('#comment{{$comment->id}}')">Abbrechen</button>
- </div>
- {{Form::close()}}
- </div>
- @else
- <p>{{$comment->text}}</p>
- @endif
- </div>
- </div>
- @endforeach
- @stop
- @section('script')
- <script type="text/javascript">
- function toggleComment(id) {
- $(id + 'edit').collapse('toggle');
- $(id + 'comment').collapse('toggle');
- }
- $(function() {
- $('.tooltip-enable').tooltip({ html: true, placement: "bottom" });
- });
- $(function() {
- $('#gesehen').popover({
- html: true,
- placement: "right",
- trigger: "click",
- title: "Als gesehen markieren",
- content: "<div class='container'><a href='{{ url('mark-read/' . $film->id) }}' class='btn btn-success'>Film als gesehen markieren</a></div>"
- });
- });
- </script>
- @stop
- @section('title')
- {{ $film->name }} ~
- @stop
|