289 lines
No EOL
17 KiB
PHP
289 lines
No EOL
17 KiB
PHP
@extends('layouts.layout')
|
|
|
|
@section('content')
|
|
<section class="jumbotron text-center">
|
|
<div class="container">
|
|
@if ($currentSeason)
|
|
<div class="lead">Aktiv: <strong>{{ $currentSeason->name }}</strong></div>
|
|
@endif
|
|
|
|
<div><a href="/seasons/create" class="btn btn-primary">Neue Saison anlegen</a></div>
|
|
|
|
@if ($currentSeason)
|
|
<div>
|
|
<ul>
|
|
@foreach($seasons as $season)
|
|
<li class="text list-unstyled" ><a href="/seasons/setcurrent/{{ $season->id }}">{{ $season->name }}</a></li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
|
|
@if ($currentSeason)
|
|
<div>
|
|
|
|
<form method="POST" action="/seasons/store_quota">
|
|
{{ csrf_field() }}
|
|
<h3>Anzahl Runden</h3>
|
|
<div class="form-group" >
|
|
<h4>
|
|
<label style="float:left; width:200px;">Anzahl Runden:</label>
|
|
<input type="text" class="form-control" id="round_count" name="round_count" value="{{ App\Round::getCount() }}" style="float:left; width:75px;"required>
|
|
|
|
</h4>
|
|
</div>
|
|
<p> </p>
|
|
<h3>Spiel-Einsatz</h3>
|
|
|
|
<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:75px;"required>
|
|
<label style="float:left;"> €</label>
|
|
</h4>
|
|
</div>
|
|
<p> </p><p> </p>
|
|
|
|
<h3>Spielquoten</h3>
|
|
|
|
<div class="form-group" style="width:450px;">
|
|
<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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['tagessieg']}} € </label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz1']+$payouts['platz2']+$payouts['platz3']+$payouts['platz4']+$payouts['platz5']+$payouts['platz6']+$payouts['platz7']+$payouts['platz8']+$payouts['platz9']+$payouts['platz10'] }} € </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['gruenes_trikot']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{ $payouts['pokal'] }} €</label>
|
|
<p> </p>
|
|
|
|
<label style="float:left; width:200px;">Liga:</label>
|
|
<input type="text" class="form-control" id="liga" name="liga" value="{{ $quotas['Liga-Wertung'] }}" style="float:left; width:75px;"required>
|
|
<label style="float:left;"> % = {{ $payouts['liga_platz1']+$payouts['liga_platz2']+$payouts['liga_platz3']+$payouts['liga_platz2_1']+$payouts['liga_platz3_1'] }} €</label>
|
|
<p> </p>
|
|
|
|
</h4>
|
|
</div>
|
|
<p> </p><p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz1']}} €</label>
|
|
<!-- <label>Test</label>-->
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz2']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz3']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz4']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz5']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz6']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz7']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz8']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz9']}} €</label>
|
|
<p> </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:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz10']}} €</label>
|
|
<p> </p>
|
|
|
|
</h4>
|
|
|
|
<h3>Liga:</h3>
|
|
@if($currentSeason)
|
|
<div>
|
|
<a class="btn btn-primary" href="/league_settings/season={{$currentSeason->id}}">Liga bearbeiten</a>
|
|
</div>
|
|
@endif
|
|
<div class="form-group" style="width:650px;" >
|
|
<h4>
|
|
<label style="float:left; width:200px;">Liga 1, Platz 1:</label>
|
|
<input type="text" class="form-control" id="liga_platz1" name="liga_platz1" value="{{ $quotas['Liga Platz 1'] }}" style="float:left; width:75px;"required>
|
|
|
|
<span class="dropdown" id="dropdown1">
|
|
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner'); return false;" class="dropbtn">{{ $winnerNames['liga_platz1'] }}</button>
|
|
<div id="dropdown_winner" class="dropdown-content" style="width:250px;">
|
|
@foreach($users as $user)
|
|
<a onclick=" setWinner('{{$user->id}}','liga_platz1');return false;" style="width:250px";>{{$user->name}}</a>
|
|
@endforeach
|
|
</div>
|
|
</span>
|
|
|
|
<label style="float:left"> % = {{$payouts['liga_platz1']}} €</label>
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
<label style="float:left; width:200px;">Liga 1, Platz 2:</label>
|
|
<input type="text" class="form-control" id="liga_platz2" name="liga_platz2" value="{{ $quotas['Liga Platz 2'] }}" style="float:left; width:75px;"required>
|
|
|
|
<span class="dropdown" id="dropdown2">
|
|
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner2'); return false;" class="dropbtn">{{ $winnerNames['liga_platz2'] }}</button>
|
|
<div id="dropdown_winner2" class="dropdown-content" style="width:250px;">
|
|
@foreach($users as $user)
|
|
<a onclick=" setWinner('{{$user->id}}','liga_platz2');return false;" style="width:250px";>{{$user->name}}</a>
|
|
@endforeach
|
|
</div>
|
|
</span>
|
|
|
|
<label style="float:left;"> % = {{$payouts['liga_platz2']}} €</label>
|
|
<p> </p>
|
|
|
|
<label style="float:left; width:200px;">Liga 1, Platz 3:</label>
|
|
<input type="text" class="form-control" id="liga_platz3" name="liga_platz3" value="{{ $quotas['Liga Platz 3'] }}" style="float:left; width:75px;"required>
|
|
|
|
<span class="dropdown" id="dropdown3">
|
|
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner3'); return false;" class="dropbtn">{{ $winnerNames['liga_platz3'] }}</button>
|
|
<div id="dropdown_winner3" class="dropdown-content" style="width:250px;">
|
|
@foreach($users as $user)
|
|
<a onclick=" setWinner('{{$user->id}}','liga_platz3');return false;" style="width:250px";>{{$user->name}}</a>
|
|
@endforeach
|
|
</div>
|
|
</span>
|
|
|
|
<label style="float:left;"> % = {{ $payouts['liga_platz3'] }} €</label>
|
|
<p> </p>
|
|
|
|
|
|
<label style="float:left; width:200px;">Liga 2, Platz 1:</label>
|
|
<input type="text" class="form-control" id="liga_platz2_1" name="liga_platz2_1" value="{{ $quotas['Liga Platz 2_1'] }}" style="float:left; width:75px;"required>
|
|
|
|
<span class="dropdown" id="dropdown4">
|
|
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner4'); return false;" class="dropbtn">{{ $winnerNames['liga_platz2_1'] }}</button>
|
|
<div id="dropdown_winner4" class="dropdown-content" style="width:250px;">
|
|
@foreach($users as $user)
|
|
<a onclick=" setWinner('{{$user->id}}','liga_platz2_1');return false;" style="width:250px";>{{$user->name}}</a>
|
|
@endforeach
|
|
</div>
|
|
</span>
|
|
|
|
<label style="float:left;"> % = {{ $payouts['liga_platz2_1'] }} €</label>
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
<label style="float:left; width:200px;">Liga 3, Platz 1:</label>
|
|
<input type="text" class="form-control" id="liga_platz3_1" name="liga_platz3_1" value="{{ $quotas['Liga Platz 3_1'] }}" style="float:left; width:75px;"required>
|
|
|
|
<span class="dropdown" id="dropdown5">
|
|
<button id="btn_winner" onclick="toggleDropdown('dropdown_winner5'); return false;" class="dropbtn">{{ $winnerNames['liga_platz3_1'] }}</button>
|
|
<div id="dropdown_winner5" class="dropdown-content" style="width:250px;">
|
|
@foreach($users as $user)
|
|
<a onclick=" setWinner('{{$user->id}}','liga_platz3_1');return false;" style="width:250px";>{{$user->name}}</a>
|
|
@endforeach
|
|
</div>
|
|
</span>
|
|
|
|
<label style="float:left;"> % = {{ $payouts['liga_platz3_1'] }} €</label>
|
|
<p> </p>
|
|
</h4>
|
|
</div>
|
|
<p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function setWinner($user_id, $quota_name, $elem_name="btn_winner") {
|
|
//alert($user_id+","+ $quota_name);
|
|
//var global_winner_id = document.getElementById($elem_winner).innerHTML=$roundname;
|
|
window.location.href = '/seasons/set_winner/'+$user_id+'/'+$quota_name;
|
|
}
|
|
|
|
// When the user clicks on the button,toggle between hiding and showing the dropdown content
|
|
function toggleDropdown($elementName) {
|
|
document.getElementById($elementName).classList.toggle("show");
|
|
}
|
|
|
|
// Close the dropdown menu if the user clicks outside of it
|
|
window.onclick = function(event) {
|
|
if (!event.target.matches('.dropbtn')) {
|
|
|
|
var dropdowns = document.getElementsByClassName("dropdown-content");
|
|
var i;
|
|
for (i = 0; i < dropdowns.length; i++) {
|
|
var openDropdown = dropdowns[i];
|
|
if (openDropdown.classList.contains('show')) {
|
|
openDropdown.classList.remove('show');
|
|
}
|
|
}
|
|
}
|
|
event.cancelBubble=true;
|
|
}
|
|
</script>
|
|
@endsection |