abgelehnt.blade.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. @extends('hello')
  2. @section('content')
  3. <div class="page-header"><h1>Abgelehnt</h1></div>
  4. {{ $filme->links() }}
  5. <table class="table">
  6. <tr>
  7. <th>Titel</th>
  8. <th></th>
  9. <th>Abgelehnt am</th>
  10. <th>Vorgeschlagen von</th>
  11. </tr>
  12. @foreach($filme as $film)
  13. <?php
  14. $stimme = 2;
  15. if(!is_null(Auth::user()) && Vote::where('film', $film->id)->where('user', Auth::user()->id)->count())
  16. $stimme = Vote::where('film', $film->id)->where('user', Auth::user()->id)->first()->stimme;
  17. ?>
  18. <tr>
  19. <td>{{ HTML::link('film/' . $film->id, $film->name) }}</td>
  20. <td>
  21. <span class="glyphicon glyphicon-comment"></span> {{ $film->comments()->count()}}
  22. @if($film->getBewertung() > 0)
  23. &nbsp;<span class="label label-{{$labels[round($film->getBewertung())]}}">{{$film->getBewertung()}}</span>
  24. @endif
  25. @if($stimme == 1)
  26. &nbsp;<span class="label label-success tooltip-enable" data-toggle="tooltip" title="Daf&uuml;r gestimmt."><span class="glyphicon glyphicon-thumbs-up"></span></span>
  27. @elseif($stimme == 0)
  28. &nbsp;<span class="label label-default tooltip-enable" data-toggle="tooltip" title="Nicht daf&uuml;r gestimmt."><span class="glyphicon glyphicon-hand-right"></span></span>
  29. @endif
  30. </td>
  31. <td>{{ \Carbon\Carbon::parse($film->abgelehnt)->format('d.m.Y')}}</td>
  32. <td><span class="badge">
  33. <img class="img-circle pull-left" src="{{ $film->besitzer->getAvatar() }}" width="20"> {{$film->besitzer->name}}
  34. </span></td>
  35. </tr>
  36. @endforeach
  37. </table>
  38. {{ $filme->links() }}
  39. @stop
  40. @section('title')
  41. Gesehen ~
  42. @stop
  43. @section('script')
  44. <script type="text/javascript">
  45. $(function() {
  46. $('.tooltip-enable').tooltip({ html: true, placement: "bottom" });
  47. });
  48. </script>
  49. @stop