180 lines
No EOL
9.1 KiB
PHP
180 lines
No EOL
9.1 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:650px;">
|
|
<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>
|
|
<span> </span>
|
|
<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>
|
|
<span> </span>
|
|
<p> </p>
|
|
|
|
|
|
|
|
|
|
</h4>
|
|
</div>
|
|
<p> </p>
|
|
|
|
|
|
<h3>Platzierungsquoten:</h3>
|
|
|
|
|
|
<div class="form-group" style="width:650px;" >
|
|
<h4>
|
|
<label style="float:left; width:200px;">Platz 1:</label>
|
|
<input type="text" class="form-control" id="platz1" name="platz1" value="{{ $quotas["platz1"] }}" 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["platz2"] }}" 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["platz3"] }}" 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["platz4"] }}" 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["platz5"] }}" 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["platz6"] }}" 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["platz7"] }}" 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["platz8"] }}" 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["platz9"] }}" 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["platz10"] }}" style="float:left; width:75px;"required>
|
|
<label style="float:left;"> % = {{$payouts['platz10']}} €</label>
|
|
<p> </p>
|
|
|
|
</h4>
|
|
|
|
|
|
<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) {
|
|
console.log("setWinner for quota="+$quota_name);
|
|
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 |