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

66 lines
2.2 KiB
PHP
Executable file

@extends('layouts.layout')
@section('content')
<section class="jumbotron text-center">
<div class="container">
<label>{{ $activeSeason->name }}</label>
@if (sizeof($rounds)<$round_count)
<div><a href="/rounds/create" class="btn btn-primary" >Runde hinzufügen</a></div>
<p>&nbsp;</p>
@endif
</div>
<div class="container">
<!-- Start Runden-Loop-->
@foreach($rounds as $round)
<div><a class="text lead" name="{{$round->id}}" style="font-size: 38px" href="/rounds/editname/{{ $round->id }}">{{ $round->name }} </a></div>
<div>Runde sperrt sich: {{$round->getLockTime()}}</div>
<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>
</tr>
<p>&nbsp;</p>
@foreach($round->games as $game)
<tr class="table-bordered">
<td>&nbsp;{{$game->team1 . " : " . $game->team2}}&nbsp;</td>
<td>&nbsp;{{App\User::toGermanDate($game->kickoff)}}&nbsp;</td>
<td><a href="/games/edit/{{$game->id}}">{{ App\Game::resultString( $game->id ) }} &nbsp; </a></td>
</tr>
@endforeach
</table>
</div>
<div class="container-fluid" style="width:800px;">
<p>&nbsp;</p>
<p>Berichterstattung</p>
<form method="POST" action="/rounds/store_report" class="text-center">
{{ csrf_field() }}
<textarea name="report" class="form-control" style="min-height:150px;height:auto;">{{ str_replace("<br/>","\n",$round->report) }}</textarea>
<input type="hidden" name="round_id" value="{{ $round->id }}">
<p></p>
<div class="form-group">
<button type="submit" class="btn btn-primary">Ok</button>
</div>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
@endforeach
</div>
</section>
@endsection