53 sor
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			53 sor
		
	
	
		
			1.3 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| @extends('hello')
 | |
| 
 | |
| @section('content')
 | |
| <div class="page-header"><h1>Vorschläge</h1></div>
 | |
| 
 | |
| {{ $filme->links() }}
 | |
| 
 | |
| <table class="table">
 | |
| 	<tr>
 | |
| 		<th>Titel</th>
 | |
| 		<th>Stimmen</th>
 | |
| 		<th>Vorgeschlagen am</th>
 | |
| 		<th>Vorgeschlagen von</th>
 | |
| 	</tr>
 | |
| @foreach($filme as $film)
 | |
| 	<tr>
 | |
| 		<td>{{ HTML::link('film/' . $film->id, $film->name) }}</td>
 | |
| 		<td>
 | |
| 			<?php 
 | |
| 				$vp = $film->upvotes; 
 | |
| 				$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="sr-only">{{$vp}} von {{$vp + $np}} (dafür)</span>
 | |
|   				</div>
 | |
|   				<div class="progress-bar progress-bar-danger" style="width: <?php if(($vp + $np) > 0) echo ($np / ($vp + $np)  * 100); else echo 0; ?>%">
 | |
|     				<span class="sr-only">{{$np}} von {{$vp + $np}} (dagegen)</span>
 | |
|   				</div>
 | |
| 			</div>
 | |
| 		</td>
 | |
| 		<td>{{ \Carbon\Carbon::parse($film->vorgeschlagen)->format('d.m.Y')}}</td>
 | |
| 		<td>{{ Film::find($film->id)->besitzer->name }}</td>
 | |
| 	</tr>
 | |
| @endforeach
 | |
| </table>
 | |
| 
 | |
| {{ $filme->links() }}
 | |
| 
 | |
| @stop
 | |
| 
 | |
| @section('title')
 | |
| Vorschläge ~
 | |
| @stop
 | |
| 
 | |
| @section('script')
 | |
| <script type="text/javascript">
 | |
| 	$(function() {
 | |
| 		$('.tooltip-enable').tooltip({ html: true, placement: "bottom" });
 | |
| 	});
 | |
| </script>
 | |
| @stop
 |