Implemented projects.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('subnav')
|
||||
<a href='{{ url()->previous() }}'>Zurück</a>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<h3>@yield('title')</h3>
|
||||
<form action="/projects/@if (!is_null($project->id)) {{ $project->id }} @endif" method='post'>
|
||||
@if (!is_null($project->id))
|
||||
{{ method_field('patch') }}
|
||||
@endif
|
||||
{{ csrf_field() }}
|
||||
<table>
|
||||
<tr>
|
||||
<td>{{ Form::label('name', 'Name') }}</td>
|
||||
<td>{{ Form::text('name', $project->name) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ Form::label('start_date', 'Beginn') }}</td>
|
||||
<td>{{ Form::date('start_date', $project->start_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ Form::label('end_date', 'Ende') }}</td>
|
||||
<td>{{ Form::date('end_date', $project->end_date) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<button type="submit" id="submit">Speichern</button>
|
||||
</form>
|
||||
@endsection
|
||||
@@ -1,4 +1,5 @@
|
||||
<ul style='list-style-type: none; padding: 0'>
|
||||
<li><a href='/people'>Personen</a></li>
|
||||
<li><a href='/bookings/year-{{ date('Y') }}'>Kassenbuch</a></li>
|
||||
<li><a href='/people'>Personen</a></li>
|
||||
<li><a href='/projects/'>Projekte</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@extends('layout.forms.projects')
|
||||
|
||||
@section('title', 'Neues Projekt')
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('title', 'Projekt löschen')
|
||||
|
||||
@section('subnav')
|
||||
<a href='{{ url()->previous() }}'>Zurück</a>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form action='/projects/{{ $project->id }}' method='post'>
|
||||
{{ method_field('delete') }}
|
||||
{{ csrf_field() }}
|
||||
<p>Soll das Projekt "<b>{{ $project->name }}</b>" wirklich gelöscht
|
||||
werden?</p>
|
||||
<button type="submit" id="submit">Ja</button>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
@extends('layout.forms.projects')
|
||||
|
||||
@section('title', 'Projekt bearbeiten')
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('title', 'Projekte')
|
||||
|
||||
@section('subnav')
|
||||
<a href='/projects/create'>Neues Projekt</a>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<h2>@yield('title')</h2>
|
||||
<h3>Aktuelle Projekte</h3>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beginn</th>
|
||||
<th>Ende</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
@foreach($projects->where('start_date', '<=', now())
|
||||
->where('end_date', '>=', now()) as $project)
|
||||
<tr>
|
||||
<td>{{ $project->name }}</td>
|
||||
<td>{{ formatDate($project->start_date) }}</td>
|
||||
<td>{{ formatDate($project->end_date) }}</td>
|
||||
<td>
|
||||
<a href='/projects/{{ $project->id }}/edit'>Bearbeiten</a><br />
|
||||
<a href='/projects/{{ $project->id }}/delete'>Löschen</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<h3>Kommende Projekte</h3>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beginn</th>
|
||||
<th>Ende</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
@foreach($projects->where('start_date', '>', now()) as $project)
|
||||
<tr>
|
||||
<td>{{ $project->name }}</td>
|
||||
<td>{{ formatDate($project->start_date) }}</td>
|
||||
<td>{{ formatDate($project->end_date) }}</td>
|
||||
<td>
|
||||
<a href='/projects/{{ $project->id }}/edit'>Bearbeiten</a><br />
|
||||
<a href='/projects/{{ $project->id }}/delete'>Löschen</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<h3>Vergangene Projekte</h3>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beginn</th>
|
||||
<th>Ende</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
@foreach($projects->where('end_date', '<', now()) as $project)
|
||||
<tr>
|
||||
<td>{{ $project->name }}</td>
|
||||
<td>{{ formatDate($project->start_date) }}</td>
|
||||
<td>{{ formatDate($project->end_date) }}</td>
|
||||
<td>
|
||||
<a href='/projects/{{ $project->id }}/edit'>Bearbeiten</a><br />
|
||||
<a href='/projects/{{ $project->id }}/delete'>Löschen</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user