Neues Update
This commit is contained in:
@@ -14,18 +14,32 @@
|
||||
</tr>
|
||||
@foreach($filme as $film)
|
||||
<tr>
|
||||
<td>{{ HTML::link('film/' . $film->id, $film->name) }}</td>
|
||||
<td>
|
||||
<?php
|
||||
$stimme = 2;
|
||||
if(!is_null(Auth::user()) && Vote::where('film', $film->id)->where('user', Auth::user()->id)->count())
|
||||
$stimme = Vote::where('film', $film->id)->where('user', Auth::user()->id)->first()->stimme;
|
||||
?>
|
||||
{{ HTML::link('film/' . $film->id, $film->name) }}
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$vp = $film->upvotes;
|
||||
$np = $film->downvotes;
|
||||
?>
|
||||
|
||||
?>
|
||||
<span class="glyphicon glyphicon-thumbs-up"></span> {{ $vp }},
|
||||
<span class="glyphicon glyphicon-thumbs-down"></span> {{ $np }}
|
||||
</td>
|
||||
<td>
|
||||
<span class='label label-{{ ($vp - $np) > 0 ? "success'>+" . ($vp - $np) : "danger'>".($vp - $np) }}</span>
|
||||
@if(($vp - $np) > 0) <span class="label label-success">+{{$vp - $np}}</span>
|
||||
@elseif(($vp - $np) < 0) <span class="label label-danger">{{$vp - $np}}</span>
|
||||
@else <span class="label label-warning">{{$vp - $np}}</span>
|
||||
@endif
|
||||
@if($stimme == 1)
|
||||
<span class="label label-success tooltip-enable" data-toggle="tooltip" title="Dafür gestimmt."><span class="glyphicon glyphicon-thumbs-up"></span></span>
|
||||
@elseif($stimme == 0)
|
||||
<span class="label label-danger tooltip-enable" data-toggle="tooltip" title="Dagegen gestimmt."><span class="glyphicon glyphicon-thumbs-down"></span></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ \Carbon\Carbon::parse($film->vorgeschlagen)->format('d.m.Y')}}</td>
|
||||
<td>{{ Film::find($film->id)->besitzer->name }}</td>
|
||||
|
||||
Reference in New Issue
Block a user