Updates on suggest-page

This commit is contained in:
2013-11-09 02:05:49 +01:00
parent 11141270e5
commit c17b699d1b

View File

@@ -8,7 +8,7 @@
<table class="table"> <table class="table">
<tr> <tr>
<th>Titel</th> <th>Titel</th>
<th>Stimmen</th> <th colspan="2">Stimmen</th>
<th>Vorgeschlagen am</th> <th>Vorgeschlagen am</th>
<th>Vorgeschlagen von</th> <th>Vorgeschlagen von</th>
</tr> </tr>
@@ -20,14 +20,12 @@
$vp = $film->upvotes; $vp = $film->upvotes;
$np = $film->downvotes; $np = $film->downvotes;
?> ?>
<div class="progress tooltip-enable" data-toggle="tooltip" title="{{ $vp }}/{{ $np }}">
<div class="progress-bar progress-bar-success" style="width: <?php if(($vp + $np) > 0) echo ($vp / ($vp + $np) * 100); else echo 0; ?>%"> <span class="glyphicon glyphicon-thumbs-up"></span>&nbsp;{{ $vp }},
<span class="sr-only">{{$vp}} von {{$vp + $np}} (daf&uuml;r)</span> <span class="glyphicon glyphicon-thumbs-down"></span>&nbsp;{{ $np }}
</div> </td>
<div class="progress-bar progress-bar-danger" style="width: <?php if(($vp + $np) > 0) echo ($np / ($vp + $np) * 100); else echo 0; ?>%"> <td>
<span class="sr-only">{{$np}} von {{$vp + $np}} (dagegen)</span> <span class='label label-{{ ($vp - $np) > 0 ? "success'>+" . ($vp - $np) : "danger'>".($vp - $np) }}</span>
</div>
</div>
</td> </td>
<td>{{ \Carbon\Carbon::parse($film->vorgeschlagen)->format('d.m.Y')}}</td> <td>{{ \Carbon\Carbon::parse($film->vorgeschlagen)->format('d.m.Y')}}</td>
<td>{{ Film::find($film->id)->besitzer->name }}</td> <td>{{ Film::find($film->id)->besitzer->name }}</td>