Sommer Style, Avatare, Duplikate

This commit is contained in:
2015-10-21 07:02:29 +02:00
parent 62d4c32d53
commit 0de0eefa37
10 changed files with 475 additions and 392 deletions

View File

@@ -12,9 +12,12 @@
@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
<span class="label label-info">
<img class="img-circle" src="{{ $film->besitzer->getAvatar() }}" width="16"> {{$film->besitzer->name}}
</span>
</div>
<div class="col-md-9">
<ul class="nav nav-tabs">
<ul class="nav nav-pills">
<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>
@@ -53,14 +56,10 @@
</dd>
<dt>Bewertung</dt>
<dd>{{ $tfilm['vote_average']}} von 10 </dd>
@if(!is_null($film->gesehen) && Comment::where('film', $film->id)->where('bewertung', '>', 0)->count() > 0)
@if($film->getBewertung() > 0)
<dt>Eigene Bewertung</dt>
<dd>
<?php
$count = Comment::where('film', $film->id)->where('bewertung', '>', 0)->count();
$avg = Comment::where('film', $film->id)->where('bewertung', '>', 0)->sum('bewertung') / $count;
?>
<div class="label label-{{$labels[round($avg)]}}">{{$avg}}</div>
<div class="label label-{{$labels[round($film->getBewertung())]}}">{{$film->getBewertung()}}</div>
</dd>
@endif
@for($i = 0; $i < 3 && $i < count($cast['crew']); $i++)
@@ -77,7 +76,7 @@
<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="pull-left" style="margin-right:5px; min-height: 80px;"><img class="media-object" src="{{ !is_null($cast['cast'][$i]['profile_path']) ? $tmdb->getImageUrl($cast['cast'][$i]['profile_path'], TMDb::IMAGE_PROFILE, 'w185') : asset("img/no-avatar.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']}}
@@ -91,7 +90,7 @@
</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>
<p></p><iframe width="420" height="315" src="//www.youtube.com/embed/{{ $yt['source'] }}" frameborder="0" allowfullscreen></iframe>
@endforeach
</div>
</div>
@@ -110,13 +109,18 @@
<dt>Daf&uuml;r</dt>
<dd>
@foreach($pv as $v)
<span class="badge">{{$v}}</span>
<span class="badge">
<img class="img-circle" src="{{ $v->getAvatar() }}" width="20"> {{$v->name}}
</span>&nbsp;
@endforeach
</dd>
<p></p>
<dt>Nicht daf&uuml;r</dt>
<dd>
@foreach($nv as $v)
<span class="badge">{{$v}}</span>
<span class="badge">
<img class="img-circle" src="{{ $v->getAvatar() }}" width="20"> {{$v->name}}
</span>&nbsp;
@endforeach
</dd>
</dl>
@@ -129,7 +133,7 @@
<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&uuml;r
</a>
<a class="btn btn-lg btn-warning <?php echo $uvote[0] && !$uvote[1] ? "disabled" : ""; ?>" href="{{ url('vote', array('no', Auth::user()->id, $film->id)) }}">
<a class="btn btn-lg btn-default <?php echo $uvote[0] && !$uvote[1] ? "disabled" : ""; ?>" href="{{ url('vote', array('no', Auth::user()->id, $film->id)) }}">
<span class="glyphicon glyphicon-hand-right"></span> Nicht daf&uuml;r
</a>
</div>
@@ -187,7 +191,7 @@
<div class="pull-left label label-{{ $labels[$comment->bewertung] }}" style="margin-right: 5px;">{{$comment->bewertung}}</div>
@endif
<p>{{$comment->text}}</p>
<button type="button" class="btn btn-xs" onclick="toggleComment('#comment{{$comment->id}}')">Bearbeiten</button>
<button type="button" class="btn btn-default btn-xs" onclick="toggleComment('#comment{{$comment->id}}')">Bearbeiten</button>
</div>
<div class="collapse" id="comment{{$comment->id}}edit">
{{Form::open(array('route' => 'modcomment'))}}
@@ -206,7 +210,7 @@
<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>
<button type="button" class="btn btn-default btn-xs" onclick="toggleComment('#comment{{$comment->id}}')">Abbrechen</button>
</div>
{{Form::close()}}
</div>
@@ -231,9 +235,9 @@
$(id + 'comment').collapse('toggle');
}
$(function() {
$('.tooltip-enable').tooltip({ html: true, placement: "bottom" });
});
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
$(function() {
$('#gesehen').popover({