Working on Leagues: Adding migrations, controllers, views

This commit is contained in:
Torsten 2017-09-08 16:22:40 +02:00
parent 50cc4c75bf
commit 7bfba61602
16 changed files with 8788 additions and 33 deletions

View file

@ -30,7 +30,7 @@ return [
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'confirmed' => 'Die :attribute Eingaben stimmen nicht überein.',
'date' => 'The :attribute is not a valid date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',

View file

@ -11,6 +11,7 @@
<!-- Custom styles for this template -->
<link href="/css/album.css" rel="stylesheet">
<link href="/css/dropdown.css" rel="stylesheet">
</head>

View file

@ -5,19 +5,24 @@
@if (Auth::check())
<a class="lead" href="/">Start</a> &nbsp; &nbsp; &nbsp;
@if (Auth::user()->admin)
<a class="lead" href="/seasons">Saison</a> &nbsp; &nbsp; &nbsp;
<a class="lead" href="/rounds#{{\App\Round::getFirstIncompleteRound()}}">Runden</a> &nbsp; &nbsp; &nbsp;
<a class="lead" href="/users">Spieler</a> &nbsp; &nbsp; &nbsp;
<a class="lead" href="/roundmails">Rundmail</a> &nbsp; &nbsp; &nbsp;
<div>
<label class="lead" style="font-color: black; font-weight: bold; font-size: 14px; ">Admin:</label>
<a class="lead" href="/seasons">Saison</a> &nbsp;
<a class="lead" href="/rounds#{{\App\Round::getFirstIncompleteRound()}}">Runden</a> &nbsp;
<a class="lead" href="/users">Spieler</a> &nbsp;
<a class="lead" href="/roundmails">Rundmail</a> &nbsp;
</div>
@endif
<a class="lead" href="/users/show_payouts">Quoten</a> &nbsp; &nbsp; &nbsp;
<a class="lead" href="/users/payout#playerid_{{Auth::user()->id}}">Geldrangliste</a> &nbsp; &nbsp; &nbsp;
<a class="lead" href="/tipps#{{\App\Round::getFirstTippableRound()->id}}">Tipps</a> &nbsp; &nbsp; &nbsp;
<a class="lead" href="/users/ranking/roundid_-1#playerid_{{Auth::user()->id}}" >Rangliste</a> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
<a class="lead" href="/">Start</a> &nbsp;
<a class="lead" href="/users/show_payouts">Quoten</a> &nbsp;
<a class="lead" href="/tipps#{{\App\Round::getFirstTippableRound()->id}}">Tipps</a> &nbsp;
<a class="lead" href="/users/ranking/roundid_-1#playerid_{{Auth::user()->id}}" >Rangliste</a> &nbsp;
<a class="lead" href="/users/payout#playerid_{{Auth::user()->id}}">Geldrangliste</a> &nbsp;
<label class="lead text ml-auto" >Spieler: <a href="/users/useredit/{{ Auth::user()->id }}">{{ Auth::user()->name }}</a></label><a class="lead" href="/logout">(abmelden)</a>
@endif
</div>

View file

@ -0,0 +1,87 @@
@extends('layouts.layout')
@section('content')
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<section class="jumbotron text-center">
<div class="container">
<h2>Liga-Spiel Einstellungen</h2>
<h2 style="width: 400px;">{{ $season->name }}</h2>
<p>&nbsp;</p>
<h3>Startrunde:</h3>
<form>
<div class="dropdown">
<button onclick="toggleDropdown('dropdown_startround'); return false;" class="dropbtn">{{$startRound['name']}}</button>
<div id="dropdown_startround" class="dropdown-content">
@foreach($rounds as $round)
<a onclick="false;" href="/league_settings/set_start_round/roundid_{{ $round->id }}">{{ $round->name }}</a>
@endforeach
</div>
</div>
<h3>Anzahl Runden:</h3>
<input></input>
<h3>Liga-Modus</h3>
<div class="dropdown">
<button onclick="toggleDropdown('dropdown_leaguemode'); return false;" class="dropbtn">Modus einstellen</button>
<div id="dropdown_leaguemode" class="dropdown-content">
<a onclick="false;" href="">Qualifikation</a>
<a onclick="false;" href="">Liga-Spiel</a>
</div>
</div>
<p>&nbsp;</p>
<div >
<button class="btn btn-primary">Liga neu erzeugen</button>
</div>
</form>
</div>
</section>
<script>
// 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;
event.cancel();
}
</script>
@endsection

View file

@ -0,0 +1,43 @@
@extends('layouts.layout')
@section('content')
<div class="container">
<h2>Liga-Spiel Einstellungen</h2>
<div class="lead">{{ $season->name }}</div>
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Dropdown</button>
<div id="myDropdown" class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</div>
</div>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").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');
}
}
}
}
</script>
@endsection