From 96101cb05d80ffc4d4c559d3ba6c37160b350344 Mon Sep 17 00:00:00 2001 From: Torsten Date: Sat, 9 Sep 2017 08:35:39 +0200 Subject: [PATCH] League Settings View --- .../Controllers/Leagues/LeagueController.php | 53 +++++++++++++++++++ .../Controllers/Leagues/MatchController.php | 17 ++++++ pfosten/app/leagues/League.php | 14 +++++ pfosten/app/leagues/Match.php | 14 +++++ .../resources/views/leagues/index.blade.php | 50 +++++++++++------ pfosten/search.py | 13 +++++ 6 files changed, 146 insertions(+), 15 deletions(-) create mode 100644 pfosten/app/Http/Controllers/Leagues/LeagueController.php create mode 100644 pfosten/app/Http/Controllers/Leagues/MatchController.php create mode 100644 pfosten/app/leagues/League.php create mode 100644 pfosten/app/leagues/Match.php create mode 100755 pfosten/search.py diff --git a/pfosten/app/Http/Controllers/Leagues/LeagueController.php b/pfosten/app/Http/Controllers/Leagues/LeagueController.php new file mode 100644 index 00000000..fa1663b4 --- /dev/null +++ b/pfosten/app/Http/Controllers/Leagues/LeagueController.php @@ -0,0 +1,53 @@ +admin) { return redirect("/"); } + + $season = Season::where('id','=',$season_id)->first(); + $rounds = Round::where('season_id','=',$season_id)->orderBy('id')->get(); + + $league = League::where('season_id','=',$season_id)->first(); + + $start_round_name="Einstellen"; + $start_round_id=-1; + if ($league) { + if ($league->start_round_id) { + $startRound = Round::where('id','=',$league->start_round_id)->first(); + $start_round_name = $startRound->name; + $start_round_id = $startRound->id; + } + } + + $startRound=array(); + $startRound['id'] = $start_round_id; + $startRound['name'] = $start_round_name; + + // Fetch existing leagues + + // No leagues: Create Qualification League or Standard League System (including matches) + // necessary input: start_round(_id), round_count + + // Delete all leagues & matches + + // + + + return view('leagues.index', compact('season','rounds','startRound')); + } +} diff --git a/pfosten/app/Http/Controllers/Leagues/MatchController.php b/pfosten/app/Http/Controllers/Leagues/MatchController.php new file mode 100644 index 00000000..754ca9fd --- /dev/null +++ b/pfosten/app/Http/Controllers/Leagues/MatchController.php @@ -0,0 +1,17 @@ +
@@ -11,28 +10,28 @@

 

Startrunde:

-
+
- @@ -57,10 +56,32 @@ - - - diff --git a/pfosten/search.py b/pfosten/search.py new file mode 100755 index 00000000..69a5ec6b --- /dev/null +++ b/pfosten/search.py @@ -0,0 +1,13 @@ +#!/usr/bin/python +import sys +import os + + +if len(sys.argv)<2: + print "\nUsage: ./search.py \n" + sys.exit() + sys.exit() + +param =sys.argv[1] + +os.system("""grep #PATTERN -R *|grep -v vendor|grep -v node_modules|grep -v database|grep -v ".sql"|grep -v "yarn.lock"|grep -v "composer.lock"|grep -v ".log"|grep -v ".min.js"|grep -v "public/js/app.js"|grep -v "public/bower"|grep -v "package-lock.json"|grep -v "storage/framework/views"|grep -v "resources/assets/sass/"|grep -v "Binary file" """.replace('#PATTERN',param))