123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- @extends('hello')
- @section('content')
- <div class="page-header"><h1>{{$titel}}</h1></div>
- {{ $filme->links() }}
- <table class="table">
- <tr>
- <th>Titel</th>
- <th colspan="2">Stimmen</th>
- <th>Vorgeschlagen am</th>
- <th>Vorgeschlagen von</th>
- </tr>
- @foreach($filme as $film)
- <tr>
- <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-transfer"></span> {{ $np != null ? $vp + $np : $film->votes }}
- </td>
- <td>
- @if(($vp) > 0) <span class="label label-default">+{{$vp}}</span>
- @else <span class="label label-default">0</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-default tooltip-enable" data-toggle="tooltip" title="Nicht dafür gestimmt."><span class="glyphicon glyphicon-hand-right"></span></span>
- @endif
- </td>
- <td>{{ \Carbon\Carbon::parse($film->vorgeschlagen)->format('d.m.Y')}}</td>
- <td>
- <span class="badge">
- <img class="img-circle" src="{{ Film::find($film->id)->besitzer->getAvatar() }}" width="20"> {{Film::find($film->id)->besitzer->name}}
- </span>
- </td>
- </tr>
- @endforeach
- </table>
- {{ $filme->links() }}
- @stop
- @section('title')
- {{$titel}} ~
- @stop
- @section('script')
- <script type="text/javascript">
- $(function() {
- $('.tooltip-enable').tooltip({ html: true, placement: "bottom" });
- });
- </script>
- @stop
|