tippspiel/pfosten/resources/views/tipps/index.blade.php

74 lines
No EOL
3.6 KiB
PHP
Executable file

@extends('layouts.layout')
@section('content')
<section class="jumbotron text-center">
<div class="container">
@if ($activeSeason)
<label>Aktive Saison:{{ $activeSeason->name }}</label>
@endif
<p class="lead" style="font-size: 32px;">Tipps</p>
<p>&nbsp;</p>
</div>
<span class="container-fluid col-md-12">
@if ($activeSeason)
<div>
@foreach($rounds as $round)
<div><a class="text lead col-md-12" name="{{$round->id}}" style="font-size: 38px">{{ $round->name }} </a></div>
<div>Runde sperrt sich: {{$round->getLockTime()}}</div>
<span class="col-md-12">
<span class="col-md-4"></span>
<span class="col-md-5">
<table class="table-bordered">
<tr class="table-bordered">
<td class="table-bordered">Spiel</td>
<td class="table-bordered">Anstoss</td>
<td class="table-bordered">Ergebnis</td>
<td class="table-bordered">Tipp</td>
<td class="table-bordered">&nbsp;Joker&nbsp;</td>
<td class="table-bordered">Punkte</td>
</tr>
@foreach($round->games as $game)
<tr class="table-bordered">
<td class="table-bordered" style="width:600px;"><label class="text" href="/games/edit/{{ $game->id }}">{{ $game->team1 }} : {{ $game->team2 }}</label>&nbsp;</td>
<td class="table-bordered" style="width:600px;"><label class="text" > {{ App\User::toGermanDate($game->kickoff) }}</label></td>
<td class="table-bordered" style="width:350px;">{{ $game->hasResult() ? $game->score1 . ' : ' . $game->score2 : ' ' }}</td>
<td class="table-bordered" style="width:75px;">
@if(App\Round::hasLockedGame($round->id)==true)
<span>{{ App\Tipp::resultString(App\Tipp::getTipp( $user->id,$game->id)->id) }} </span>
@else
<a href="/tipps/edit/{{App\Tipp::getTipp($user->id,$game->id)->id}}">{{ App\Tipp::getTipp($user->id,$game->id)->score1== -1 ? 'Tippen': App\Tipp::resultString(App\Tipp::getTipp($user->id,$game->id)->id) }} </a>
@endif
</td>
<td class="table-bordered"><img src="/img/joker.png" style="{{ (App\Tipp::getTipp($user->id,$game->id)->joker==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></td>
<td class="table-bordered">{{App\Tipp::getScore(App\Tipp::getTipp($user->id,$game->id)->id)}}</td>
</tr>
@endforeach
</table>
</span>
</span>
<p>&nbsp;</p>
@endforeach
</div>
@endif
</span>
</section>
@endsection