Added abgelehnt feature, fixed counting up/downvotes on landing page and movies by date page
This commit is contained in:
56
app/views/abgelehnt.blade.php
Normal file
56
app/views/abgelehnt.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('hello')
|
||||
|
||||
@section('content')
|
||||
<div class="page-header"><h1>Abgelehnt</h1></div>
|
||||
|
||||
{{ $filme->links() }}
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Titel</th>
|
||||
<th></th>
|
||||
<th>Abgelehnt am</th>
|
||||
<th>Vorgeschlagen von</th>
|
||||
</tr>
|
||||
@foreach($filme as $film)
|
||||
<?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;
|
||||
?>
|
||||
<tr>
|
||||
<td>{{ HTML::link('film/' . $film->id, $film->name) }}</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-comment"></span> {{ $film->comments()->count()}}
|
||||
@if($film->getBewertung() > 0)
|
||||
<span class="label label-{{$labels[round($film->getBewertung())]}}">{{$film->getBewertung()}}</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->abgelehnt)->format('d.m.Y')}}</td>
|
||||
<td><span class="badge">
|
||||
<img class="img-circle pull-left" src="{{ $film->besitzer->getAvatar() }}" width="20"> {{$film->besitzer->name}}
|
||||
</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
{{ $filme->links() }}
|
||||
|
||||
@stop
|
||||
|
||||
@section('title')
|
||||
Gesehen ~
|
||||
@stop
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.tooltip-enable').tooltip({ html: true, placement: "bottom" });
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
Reference in New Issue
Block a user