Added HTML Helpers from Laravelcollective

This commit is contained in:
Torsten 2017-06-21 17:12:07 +02:00
parent 0736ecf29f
commit b5c1f40a45
31 changed files with 614 additions and 220 deletions

View file

@ -2,7 +2,10 @@
@section('content')
<div class="col-md-8">
<h1>Runde erstellen</h1>
@if($currentSeason==null)
<h1>Bitte zuerst eine Saison erstellen</h1>
@endif
<h1>Runde erstellen für Saison:{{ $currentSeason->name }}</h1>
<form method="POST" action="/rounds/store">
@ -12,6 +15,87 @@
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="form-group" >
<label class="lead">Spiel 1</label>
<span class="form-group" style="float:right;width:400px;">
<label for="game1_team1">Team 1:</label>
<input type="text" class="form-control" id="game1_team1" name="game1_team1" required>
<label for="game1_team2">Team 2:</label>
<input type="text" class="form-control" id="game1_team2" name="game1_team2" required>
<label for="game1_kickoff">Anstoss:</label>
<input type="datetime-local" class="form-control" id="game1_kickoff" name="game1_kickoff" required>
</span>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div class="form-group" >
<label class="lead">Spiel 2</label>
<span class="form-group" style="float:right;width:400px;">
<label for="game2_team1">Team 1:</label>
<input type="text" class="form-control" id="game2_team1" name="game2_team1" required>
<label for="game1_team1">Team 2:</label>
<input type="text" class="form-control" id="game2_team2" name="game2_team2" required>
<label for="game2_kickoff">Anstoss:</label>
<input type="datetime-local" class="form-control" id="game2_kickoff" name="game2_kickoff" required>
</span>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div class="form-group" >
<label class="lead">Spiel 3</label>
<span class="form-group" style="float:right;width:400px;">
<label for="game3_team1">Team 1:</label>
<input type="text" class="form-control" id="game3_team1" name="game3_team1" required>
<label for="game3_team2">Team 2:</label>
<input type="text" class="form-control" id="game3_team2_name" name="game3_team2" required>
<label for="game3_kickoff">Anstoss:</label>
<input type="datetime-local" class="form-control" id="game3_kickoff" name="game3_kickoff" required>
</span>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div class="form-group" >
<label class="lead">Spiel 4</label>
<span class="form-group" style="float:right;width:400px;">
<label for="game4_team1">Team 1:</label>
<input type="text" class="form-control" id="game4_team1" name="game4_team1" required>
<label for="game4_team2">Team 2:</label>
<input type="text" class="form-control" id="game4_team2" name="game4_team2" required>
<label for="game4_kickoff">Anstoss:</label>
<input type="datetime-local" class="form-control" id="game4_kickoff" name="game4_kickoff" required>
</span>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Erstellen</button>
</div>

View file

@ -0,0 +1,27 @@
@extends('layouts.layout')
@section('content')
<div class="col-md-8">
<h1>Name der Runde:</h1>
<form method="POST" action="/rounds/storename">
{{ csrf_field() }}
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" id="name" name="name" value="{{ $round->name }}" required>
<input type="hidden" name="round_id" value="{{ $round->id }}">
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Ok</button>
</div>
</form>
</div>
@endsection

View file

@ -5,24 +5,28 @@
<div class="container">
@if ($activeSeason)
<label>Aktive Saison:{{ $activeSeason->name }}</label>
<label>Saison:{{ $activeSeason->name }}</label>
@endif
<div class="lead">Runden Liste</div>
<div class="lead">Runden</div>
<div><a href="/rounds/create" class="btn btn-primary">Runde hinzufügen</a></div>
<p>&nbsp;</p>
@if ($activeSeason)
<div>
<ul>
@foreach($rounds as $round)
<li class="text list-unstyled">{{ $round->name }}</li>
@foreach($rounds->reverse() as $round)
<div><a class="text lead" href="/rounds/editname/{{ $round->id }}">{{ $round->name }} </a></div>
@foreach($round->games as $game)
<div><a class="text" href="/games/edit/{{ $game->id }}">{{ $game->team1 }} : {{ $game->team2 }} [ Anstoss {{ $game->kickoff }} ] </a></div>
@endforeach
</ul>
<p>&nbsp;</p>
@endforeach
</div>
@endif
<div><a href="/rounds/create" class="btn btn-primary">Neue anlegen</a></div>