Quota Editor

This commit is contained in:
Torsten 2017-08-18 16:44:11 +02:00
parent 82d6e6a119
commit 954eca957b
7 changed files with 183 additions and 50 deletions

View file

@ -46,7 +46,7 @@
<form method="POST" action="/rounds/store_report" class="text-center">
{{ csrf_field() }}
<textarea name="report" class="form-control" style="min-height:150px;height:auto;">{{ $round->report }}</textarea>
<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>

View file

@ -3,11 +3,11 @@
@section('content')
<section class="jumbotron text-center">
<div class="container">
@if ($activeSeason)
<div class="lead">Aktive Saison: {{ $activeSeason->name }}</div>
@if ($currentSeason)
<div class="lead">Aktiv: <strong>{{ $currentSeason->name }}</strong></div>
@endif
@if ($activeSeason)
@if ($currentSeason)
<div>
<ul>
@foreach($seasons as $season)
@ -17,31 +17,164 @@
</div>
@endif
<div><a href="/seasons/create" class="btn btn-primary">Neue anlegen</a></div>
<div><a href="/seasons/create" class="btn btn-primary">Neue Saison anlegen</a></div>
@if ($activeSeason)
@if ($currentSeason)
<div>
<h3>Spielquoten</h3>
<h4>Spielmodus: Tagessieg 50%</h4>
<h4>Spielmodus: Platzierung 50%</h4>
<p>&nbsp;</p>
<h3>Platzierungsquoten:</h3>
<h4>Platz 1: 21 %</h4>
<h4>Platz 2: 17 %</h4>
<h4>Platz 3: 13 %</h4>
<h4>Platz 4: 10 %</h4>
<h4>Platz 5: 9%</h4>
<h4>Platz 6: 8%</h4>
<h4>Platz 7: 7%</h4>
<h4>Platz 8: 6%</h4>
<h4>Platz 9: 5%</h4>
<h4>Platz 10: 4%</h4>
<h3>Spiel-Einsatz</h3>
<form method="POST" action="/seasons/store_quota">
{{ csrf_field() }}
<div class="form-group" >
<h4>
<label style="float:left; width:200px;">Einsatz pro Spieler:</label>
<input type="text" class="form-control" id="einsatz" name="einsatz" value="{{ $quotas['Einsatz'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;€</label>
</h4>
</div>
<p>&nbsp;</p><p>&nbsp;</p>
<h3>Spielquoten</h3>
<div class="form-group" >
<h4>
<label style="float:left; width:200px;">Tagessieg:</label>
<input type="text" class="form-control" id="tagessieg" name="tagessieg" value="{{ $quotas['Tagessieg'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_tagessieg}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platzierung:</label>
<input type="text" class="form-control" id="platzierung" name="platzierung" value="{{ $quotas['Platzierung'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;%</label>
<label style="float:left; width:200px;">Grünes Trikot:</label>
<input type="text" class="form-control" id="gruenes_trikot" name="gruenes_trikot" value="{{ $quotas['Gruenes Trikot'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;%</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Pokal:</label>
<input type="text" class="form-control" id="liga" name="liga" value="{{ $quotas['Liga-Wertung'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;%</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Pokal:</label>
<input type="text" class="form-control" id="pokal" name="pokal" value="{{ $quotas['Pokal'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;%</label>
<p>&nbsp;</p>
</h4>
</div>
<p>&nbsp;</p><p>&nbsp;</p>
<h3>Platzierungsquoten:</h3>
<div class="form-group" >
<h4>
<label style="float:left; width:200px;">Platz 1:</label>
<input type="text" class="form-control" id="platz1" name="platz1" value="{{ $quotas["Platz 1"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz1}} €</label>
<!-- <label>Test</label>-->
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 2:</label>
<input type="text" class="form-control" id="platz2" name="platz2" value="{{ $quotas["Platz 2"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz2}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 3:</label>
<input type="text" class="form-control" id="platz3" name="platz3" value="{{ $quotas["Platz 3"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz3}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 4:</label>
<input type="text" class="form-control" id="platz4" name="platz4" value="{{ $quotas["Platz 4"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz4}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 5:</label>
<input type="text" class="form-control" id="platz5" name="platz5" value="{{ $quotas["Platz 5"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz5}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 6:</label>
<input type="text" class="form-control" id="platz6" name="platz6" value="{{ $quotas["Platz 6"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz6}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 7:</label>
<input type="text" class="form-control" id="platz7" name="platz7" value="{{ $quotas["Platz 7"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz7}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 8:</label>
<input type="text" class="form-control" id="platz8" name="platz8" value="{{ $quotas["Platz 8"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz8}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 9:</label>
<input type="text" class="form-control" id="platz9" name="platz9" value="{{ $quotas["Platz 9"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz9}} €</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 10:</label>
<input type="text" class="form-control" id="platz10" name="platz10" value="{{ $quotas["Platz 10"] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;% = {{$euro_platz10}} €</label>
<p>&nbsp;</p>
</h4>
<h3>Liga:</h3>
<div class="form-group" >
<h4>
<label style="float:left; width:200px;">Platz 1:</label>
<input type="text" class="form-control" id="liga_platz1" name="liga_platz1" value="{{ $quotas['Liga Platz 1'] }}" style="float:left; width:50px;"required>
<label style="float:left">&nbsp;%</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 2:</label>
<input type="text" class="form-control" id="liga_platz2" name="liga_platz2" value="{{ $quotas['Liga Platz 2'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;%</label>
<p>&nbsp;</p>
<label style="float:left; width:200px;">Platz 3:</label>
<input type="text" class="form-control" id="liga_platz3" name="liga_platz3" value="{{ $quotas['Liga Platz 3'] }}" style="float:left; width:50px;"required>
<label style="float:left;">&nbsp;%</label>
<p>&nbsp;</p>
</h4>
</div>
<p>&nbsp;</p><p>&nbsp;</p>
</div>
<p>&nbsp;</p><p>&nbsp;</p>
<input type="hidden" name="season_id" value="{{ $currentSeason->id }}">
<div class="form-group">
<button type="submit" class="btn btn-primary">Speichern</button>
</div>
</form>
</div>
@endif
</div>
</section>
@endsection

View file

@ -131,35 +131,9 @@
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Joker</span>
</div>
</th>
<th style="height:140px;white-space: nowrap;">
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Debug (DayWinScore)</span>
</div>
</th>
<!-- Spielergebnis als erste Zeile -->
<tr>
<td></td>
<td></td>
<td>Spiel-Ergebnis</td>
<td></td>
<td></td>
<td align="center">{{ ($game_results[0]==-1? "" : $game_results[0]) }}</td>
<td align="center">{{ ($game_results[1]==-1? "" : $game_results[1]) }}</td>
<td></td>
<td align="center">{{ ($game_results[2]==-1? "" : $game_results[2]) }}</td>
<td align="center">{{ ($game_results[3]==-1? "" : $game_results[3]) }}</td>
<td></td>
<td align="center">{{ ($game_results[4]==-1? "" : $game_results[4]) }}</td>
<td align="center">{{ ($game_results[5]==-1? "" : $game_results[5]) }}</td>
<td></td>
<td align="center">{{ ($game_results[6]==-1? "" : $game_results[6]) }}</td>
<td align="center">{{ ($game_results[7]==-1? "" : $game_results[7]) }}</td>
<td></td>
<td></td>
</tr>
@foreach($rankingDisplay as $entry)
@ -181,10 +155,32 @@
<td class="table-bordered" align="center" style="{{$entry["trendCol4"]}}">&nbsp;{{ str_replace("-1","x",$entry["tipp_score7"]) }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$entry["trendCol4"]}}">&nbsp;{{ str_replace("-1","x",$entry["tipp_score8"]) }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($entry["joker4"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" >&nbsp;{{ $entry["dayscore"] }}&nbsp;</td>
</tr>
@endforeach
<!-- Spielergebnis als letzte Zeile -->
<tr>
<td></td>
<td></td>
<td>Spiel-Ergebnis</td>
<td></td>
<td></td>
<td align="center">{{ ($game_results[0]==-1? "" : $game_results[0]) }}</td>
<td align="center">{{ ($game_results[1]==-1? "" : $game_results[1]) }}</td>
<td></td>
<td align="center">{{ ($game_results[2]==-1? "" : $game_results[2]) }}</td>
<td align="center">{{ ($game_results[3]==-1? "" : $game_results[3]) }}</td>
<td></td>
<td align="center">{{ ($game_results[4]==-1? "" : $game_results[4]) }}</td>
<td align="center">{{ ($game_results[5]==-1? "" : $game_results[5]) }}</td>
<td></td>
<td align="center">{{ ($game_results[6]==-1? "" : $game_results[6]) }}</td>
<td align="center">{{ ($game_results[7]==-1? "" : $game_results[7]) }}</td>
<td></td>
</tr>
<!-- Control Cell width -->
<tr>
<td> <div></div></td>
@ -202,7 +198,7 @@
<td style="width:50px;"> <div></div></td>
<td style="width:50px;"> <div></div></td>
<td style="width:50px;"> <div></div></td>
<td style="width:50px;"> <div></div></td>
</tr>
</table>

View file

@ -26,6 +26,7 @@ Route::get('/seasons','SeasonsController@index');
Route::get('/seasons/create','SeasonsController@create');
Route::post('/seasons/store','SeasonsController@store');
Route::get('/seasons/setcurrent/{new_season_id}','SeasonsController@setcurrent');
Route::post('/seasons/store_quota','SeasonsController@store_quota');
Route::get('/rounds','RoundsController@index');
Route::get('/rounds/create','RoundsController@create');

View file

@ -34,6 +34,7 @@ return array(
'App\\Providers\\BroadcastServiceProvider' => $baseDir . '/app/Providers/BroadcastServiceProvider.php',
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
'App\\Quota' => $baseDir . '/app/Quota.php',
'App\\Round' => $baseDir . '/app/Round.php',
'App\\Season' => $baseDir . '/app/Season.php',
'App\\Setting' => $baseDir . '/app/Setting.php',

View file

@ -306,6 +306,7 @@ class ComposerStaticInita19fb0695e1b61b4feeb3cc3fbdd2feb
'App\\Providers\\BroadcastServiceProvider' => __DIR__ . '/../..' . '/app/Providers/BroadcastServiceProvider.php',
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
'App\\Quota' => __DIR__ . '/../..' . '/app/Quota.php',
'App\\Round' => __DIR__ . '/../..' . '/app/Round.php',
'App\\Season' => __DIR__ . '/../..' . '/app/Season.php',
'App\\Setting' => __DIR__ . '/../..' . '/app/Setting.php',

View file

@ -48,8 +48,9 @@
<div class="flex-center position-ref full-height">
<div class="content">
<div class="title">
Be right back.
Das Tippspiel wird gerade gewartet.
</div>
<h2>Bitte versuche es in 5 Minuten noch einmal.</h2>
</div>
</div>
</body>