Working on gshirt ranking view

This commit is contained in:
Torsten 2017-12-19 08:23:22 +01:00
parent 162f079a84
commit 29cc34590d
3 changed files with 34 additions and 32 deletions

View file

@ -65,7 +65,7 @@ class SeasonsController extends Controller
$nr=1; $nr=1;
$roundcount=request('roundcount'); $roundcount=request('roundcount');
$seasonId = Season::getCurrent()->id; $seasonId = Season::getCurrent()->id;
$endOfYear = Carbon\Carbon::createFromDate(Carbon\Carbon::now()->year,12,31); $endOfSeason = Carbon\Carbon::now()->addMonth(7);
while($nr<=$roundcount) { while($nr<=$roundcount) {
$roundname="Runde ".$nr; $roundname="Runde ".$nr;
@ -82,7 +82,7 @@ class SeasonsController extends Controller
'team1' => "Mannschaft 1", 'team1' => "Mannschaft 1",
'team2' => "Mannschaft 2", 'team2' => "Mannschaft 2",
//'kickoff' => User::toDBDate(request('game1_kickoff')) //'kickoff' => User::toDBDate(request('game1_kickoff'))
'kickoff' => $endOfYear 'kickoff' => $endOfSeason
]); ]);
$game1->save(); $game1->save();
@ -90,7 +90,7 @@ class SeasonsController extends Controller
'round_id' => $round_id, 'round_id' => $round_id,
'team1' => "Mannschaft 3", 'team1' => "Mannschaft 3",
'team2' => "Mannschaft 4", 'team2' => "Mannschaft 4",
'kickoff' => $endOfYear 'kickoff' => $endOfSeason
]); ]);
$game2->save(); $game2->save();
@ -98,7 +98,7 @@ class SeasonsController extends Controller
'round_id' => $round_id, 'round_id' => $round_id,
'team1' => "Mannschaft 5", 'team1' => "Mannschaft 5",
'team2' => "Mannschaft 6", 'team2' => "Mannschaft 6",
'kickoff' => $endOfYear 'kickoff' => $endOfSeason
]); ]);
$game3->save(); $game3->save();
@ -106,7 +106,7 @@ class SeasonsController extends Controller
'round_id' => $round_id, 'round_id' => $round_id,
'team1' => "Mannschaft 7", 'team1' => "Mannschaft 7",
'team2' => "Mannschaft 8", 'team2' => "Mannschaft 8",
'kickoff' => $endOfYear 'kickoff' => $endOfSeason
]); ]);
$game4->save(); $game4->save();
// Sign them in // Sign them in

View file

@ -19,7 +19,7 @@
@include('layouts.nav') @include('layouts.nav')
<div class="container" style="width:100%;"> <div class="container" style="width:100%; float:left;">
@yield('content') @yield('content')
</div> </div>

View file

@ -1,35 +1,37 @@
@extends('layouts.layout') @extends('layouts.layout')
@section('content') @section('content')
<section class="jumbotron text-center container"> <section class="text-center">
<!-- <div class="container">
<div class="main-container">
<div class="fixer-container">
<div class="lead" >Grünes Trikot</div>
--> <h1>Grünes Trikot</h1>
<table class="table-bordered"> <table class="col-md-12">
<tr> <th style="height:140px; white-space: nowrap;border-bottom: 1px solid #ccc; ">
<td>Spieler</td> <div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
@foreach ($roundnames as $roundname) <span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Spieler</span>
<td> {{ $roundname }} </td> </div>
@endforeach </th>
</tr>
@foreach ($rankingDisplay as $rounds) @foreach ($roundnames as $roundname)
<tr> <th style="white-space: nowrap;border-bottom: 1px solid #ccc;">
<td>{{$rounds[0]['user_name']}}</td> <div style="transform:translate(10px, 51px) rotate(270deg);width:30px;">
@foreach($rounds as $round) <span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{ $roundname }} </span>
<td> {{ $round['gshirt_totalscore']}} &nbsp;( +{{$round['gshirt_score']}} )&nbsp;[{{$round['gshirt_foulcount']}} fouls]</td> &nbsp;&nbsp;&nbsp; </div>
@endforeach </th>
</tr> @endforeach
@foreach ($rankingDisplay as $rounds)
<tr>
<td style="white-space: nowrap;border: 1px solid #ccc;" >{{$rounds[0]['user_name']}}</td>
@foreach($rounds as $round)
<td style="white-space: nowrap;border: 1px solid #ccc;"> {{ $round['gshirt_totalscore']}} <br/>( +{{$round['gshirt_score']}} )<br/>[{{$round['gshirt_foulcount']}} fouls]</td>
@endforeach @endforeach
</tr>
@endforeach
</table>
</div>
</table>
<!--
</div>
</div>
-->
</section> </section>
@endsection @endsection