Working on Qualification Pairings

This commit is contained in:
Torsten 2017-09-22 17:40:48 +02:00
parent 9c0f94758d
commit a66189ca00
19 changed files with 9005 additions and 237 deletions

View file

@ -20,6 +20,9 @@
<script type="text/javascript" src="/bower/moment/min/moment.min.js"></script>
<script type="text/javascript" src="/bower/moment/locale/de.js"></script>
<script type="text/javascript" src="/bower/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="/bower/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />
<script type="text/javascript">

View file

@ -2,29 +2,58 @@
<div class="navbar">
<div class="container text-center">
@if (Auth::check())
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/">Start</a>
&nbsp;
@if (Auth::user()->admin)
<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>
<label class="dropdown" id="dropdown1">
<a href="#" id="btn_admin" onclick="toggleSelect('dropdown_admin'); return false;" style="font-weight:normal; font-color: blue; font-size: 22px;">Administration</a>
<div id="dropdown_admin" class="dropdown-content">
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/seasons">Saison</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/rounds#{{\App\Round::getFirstIncompleteRound()}}">Runden</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users">Spieler</a>
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/roundmails">Rundmail</a>
</div>
</label>
@endif
<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>
&nbsp;
<a style="font-color: blue; font-size: 22px;" href="/tipps#{{\App\Round::getFirstTippableRound()->id}}">Tipps</a> &nbsp;
&nbsp;
<a style="font-color: blue; font-size: 22px;" href="/users/ranking/roundid_-1#playerid_{{Auth::user()->id}}" >Rangliste</a> &nbsp;
&nbsp;
<label class="dropdown" id="dropdown2">
<a href="#" id="btn_league" onclick="toggleSelect('dropdown_league'); return false;" style="font-weight:normal; font-color: blue; font-size: 22px;">Spieler-Liga</a>
<div id="dropdown_league" class="dropdown-content">
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/league_show_rounds/league_rank=4/round_id=30">Spielplan</a> &nbsp;
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="#">Tabellen</a> &nbsp;
</div>
</label>
&nbsp;
<label class="dropdown" id="dropdown3">
<a href="#" id="btn_info" onclick="toggleSelect('dropdown_info'); return false;" style="font-weight:normal; font-color: blue; font-size: 22px;">Info</a>
<div id="dropdown_info" class="dropdown-content">
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/show_payouts">Quoten</a> &nbsp;
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/payout#playerid_{{Auth::user()->id}}">Geldrangliste</a> &nbsp;
</div>
</label>
&nbsp;
<label class="dropdown" id="dropdown4">
<a href="#" id="btn_player" onclick="toggleSelect('dropdown_player'); return false;" style="font-weight:normal; font-color: blue; font-size: 22px;">&nbsp;( {{Auth::user()->name}} )</a>
<div id="dropdown_player" class="dropdown-content">
<a style="font-weight: normal; font-color: blue; font-size: 22px;" href="/users/useredit/{{ Auth::user()->id }}">Einstellungen</a>
<a style="font-weight: normal; font-color: blue; font-size: 22px;" href="/logout">Abmelden</a>
</div>
</label>
@endif
</div>
</div>
<script>
// When the user clicks on the button,toggle between hiding and showing the dropdown content
function toggleSelect($elementName) {
document.getElementById($elementName).classList.toggle("show");
}
</script>
</div>

View file

@ -0,0 +1,36 @@
@extends('layouts.layout')
@section('content')
<section class="text-center">
<div class="container">
<label>{{ $season->name }}</label>
<h2>Spielplan</h2>
<!-- Start Runden-Loop-->
@foreach($matchesTotal as $round_id => $roundGroup)
<h3>{{$roundNames[$round_id]}}</h3>
<table class="table-bordered col-lg-12">
<tr class="table-bordered">
<td class="table-bordered" style="width:150px;">Gruppe</td>
<td class="table-bordered" style="width:150px;">Spieler 1</td>
<td class="table-bordered" style="width:150px;">Spieler 2</td>
<td class="table-bordered" style="width:150px;">Ergebnis</td>
</tr>
<p>&nbsp;</p>
@foreach($matchesTotal[$round_id] as $match)
@if ($leagueNames[$match->league_id]=="Qualifikationsgruppe 4") <!-- Debug -->
<tr class="table-bordered">
<td>&nbsp;{{$leagueNames[$match->league_id]}}&nbsp;</td>
<td>&nbsp;{{$match->user1_id}}-{{$match->user1_name}}&nbsp;</td>
<td>&nbsp;{{$match->user2_id}}-{{$match->user2_name}}&nbsp;</td>
<td>0:0</td>
</tr>
@endif
@endforeach
</table>
@endforeach
</div>
</section>
@endsection

View file

@ -1,43 +0,0 @@
@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

View file

@ -1,21 +1,23 @@
@extends('layouts.layout')
@section('content')
<section class="jumbotron text-center">
@if(Auth::check())
@if($hourDiffToLock<49)
@if (strlen($message_text_tipps)>0)
<div><p class="blink_text">{{ $message_text_tipps }}</p></div>
@endif
@if (strlen($message_text_joker)>0)
<div><p class="blink_text">{{ $message_text_joker }}</p></div>
@endif
@if (strlen($nextRoundLockTime)>0)
<div><p class="blink_text">{{ $nextRoundName }} sperrt sich: {{ $nextRoundLockTime }} ( noch {{ $hourDiffToLock }} )</p></div>
<!-- <section class="jumbotron text-center"> -->
<section class="container-fluid col-md-12">
<span class="col-md-2"></span>
<span class="text-center col-md-8">
@if(Auth::check())
@if($hourDiffToLock<49)
@if (strlen($message_text_tipps)>0)
<div><p class="blink_text" style="font-size:21px;">{{ $message_text_tipps }}</p></div>
@endif
@if (strlen($message_text_joker)>0)
<div><p class="blink_text" style="font-size:21px;">{{ $message_text_joker }}</p></div>
@endif
@if (strlen($nextRoundLockTime)>0)
<div><p class="blink_text" style="font-size:21px;">{{ $nextRoundName }} sperrt sich: {{ $nextRoundLockTime }} ( noch {{ $hourDiffToLock }} Stunden )</p></div>
@endif
@endif
@endif
@endif
<div class="container">
<h1 class="jumbotron-heading">Hoschis Tippspiel</h1>
<p class="lead text-muted">Eine Tippgemeinschaft unter Freunden.</p>
<div><p></p><p></p><p></p></div>
@ -24,12 +26,13 @@
<div>
<a href="/login" class="btn btn-primary">Anmelden</a>
</div>
<div><p></p><p></p><p></p></div>
</div>
<a href="/register" class="btn btn-primary">Registrieren</a>
@endif
<p>&nbsp;</p>
<div>
<a href="/register" class="btn btn-primary">Registrieren</a>
</div>
@endif
</span>
</section>
@if (Auth::check())
@foreach($display_rounds as $round)