Public Access
bugfixes
This commit is contained in:
1 parent
3db040e243
commit
9a3187f9b6
11 files changed
+332
-114
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<div class="col-md-12"><div class="col-md-3"> </div><div class="col-md-4 col-lg-4">
|
||||
<p>Muss noch variabel gefüllt werden</p>
|
||||
<p><a href="#" target="_blank">Bewerbungsbedingungen</a></p>
|
||||
<form method="POST" action="{{ route('bewerbung.store') }}" enctype="multipart/form-data">@csrf
|
||||
<form method="POST" action="">
|
||||
<label for="bname">Bandname*</label>
|
||||
<input type="text" name="bname" id="bname" class="text" placeholder="Bandname" value="" required>
|
||||
<label for="musik">Musikrichtung</label>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
@extends('template')
|
||||
|
||||
@section('title', 'Bewerbung erstellen')
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
<h1 class="h3 mb-3">Bewerbung erstellen</h1>
|
||||
<form action="{{ route('bewerbungen.store') }}" method="POST" enctype="multipart/form-data" novalidate>
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6 mt-3">
|
||||
<label for="name" class="mb-2">Bewerbungsname*</label>
|
||||
<input type="text" id="name" name="name" class="form-control mb-3" value="{{ old('name', $bewerbung->name ?? '') }}" required>
|
||||
|
||||
<label for="text" class="mb-2">Bewerbungstext*</label>
|
||||
<textarea name="text" id="text" class="form-control mb-3" rows="6" required>{{ old('text', $bewerbung->text ?? '') }}</textarea>
|
||||
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="active" name="active" {{ old('active', $bewerbung->active ?? false) ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="active">Aktiv</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="time" name="time" {{ old('time', $bewerbung->time ?? false) ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="time">Mit Zeitraum</label>
|
||||
</div>
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col">
|
||||
<label class="mb-2" for="start_at">Start</label>
|
||||
<input type="datetime-local" id="start_at" name="start_at" class="form-control mb-3" value="{{ old('start_at', isset($bewerbung->start_at) ? $bewerbung->start_at->format('Y-m-d\TH:i') : '') }}">
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="mb-2" for="end_at">Ende</label>
|
||||
<input type="datetime-local" id="end_at" name="end_at" class="form-control mb-3" value="{{ old('end_at', isset($bewerbung->end_at) ? $bewerbung->end_at->format('Y-m-d\TH:i') : '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-3">
|
||||
<label for="pic" class="mb-2">Bild (jpg/png, optional)</label>
|
||||
<input type="file" id="pic" name="pic" class="form-control mb-3" accept="image/jpeg,image/png">
|
||||
@isset($bewerbung->pic_path)
|
||||
<p>Aktuell: <a href="{{ Storage::url($bewerbung->pic_path) }}" target="_blank">Bild ansehen</a></p>
|
||||
@endisset
|
||||
|
||||
<label for="bedingungen" class="mb-2">Bewerbungsbedingungen (PDF, optional)</label>
|
||||
<input type="file" id="bedingungen" name="bedingungen" class="form-control mb-3" accept="application/pdf">
|
||||
@isset($bewerbung->bedingungen_path)
|
||||
<p>Aktuell: <a href="{{ Storage::url($bewerbung->bedingungen_path) }}" target="_blank">PDF ansehen</a></p>
|
||||
@endisset
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger mt-3">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-3">
|
||||
<a href="{{ route('bewerbungen.index') }}" class="btn btn-outline-secondary">Abbrechen</a>
|
||||
<button class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,71 @@
|
||||
@extends('template')
|
||||
|
||||
@section('title', 'Bewerbung bearbeiten')
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
<h1 class="h3 mb-3">Bewerbung bearbeiten</h1>
|
||||
<form action="{{ route('bewerbungen.update', $bewerbung) }}" method="POST" enctype="multipart/form-data" novalidate>
|
||||
@method('PUT')
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6 mt-3">
|
||||
<label for="name" class="mb-2">Bewerbungsname*</label>
|
||||
<input type="text" id="name" name="name" class="form-control mb-3" value="{{ old('name', $bewerbung->name ?? '') }}" required>
|
||||
|
||||
<label for="text" class="mb-2">Bewerbungstext*</label>
|
||||
<textarea name="text" id="text" class="form-control mb-3" rows="6" required>{{ old('text', $bewerbung->text ?? '') }}</textarea>
|
||||
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="active" name="active" {{ old('active', $bewerbung->active ?? false) ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="active">Aktiv</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="time" name="time" {{ old('time', $bewerbung->time ?? false) ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="time">Mit Zeitraum</label>
|
||||
</div>
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col">
|
||||
<label class="mb-2" for="start_at">Start</label>
|
||||
<input type="datetime-local" id="start_at" name="start_at" class="form-control mb-3" value="{{ old('start_at', isset($bewerbung->start_at) ? $bewerbung->start_at->format('Y-m-d\TH:i') : '') }}">
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="mb-2" for="end_at">Ende</label>
|
||||
<input type="datetime-local" id="end_at" name="end_at" class="form-control mb-3" value="{{ old('end_at', isset($bewerbung->end_at) ? $bewerbung->end_at->format('Y-m-d\TH:i') : '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-3">
|
||||
<label for="pic" class="mb-2">Bild (jpg/png, optional)</label>
|
||||
<input type="file" id="pic" name="pic" class="form-control mb-3" accept="image/jpeg,image/png">
|
||||
@isset($bewerbung->pic_path)
|
||||
<p>Aktuell: <a href="{{ Storage::url($bewerbung->pic_path) }}" target="_blank">Bild ansehen</a></p>
|
||||
@endisset
|
||||
|
||||
<label for="bedingungen" class="mb-2">Bewerbungsbedingungen (PDF, optional)</label>
|
||||
<input type="file" id="bedingungen" name="bedingungen" class="form-control mb-3" accept="application/pdf">
|
||||
@isset($bewerbung->bedingungen_path)
|
||||
<p>Aktuell: <a href="{{ Storage::url($bewerbung->bedingungen_path) }}" target="_blank">PDF ansehen</a></p>
|
||||
@endisset
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="alert alert-danger mt-3">
|
||||
<ul class="mb-0">
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-3">
|
||||
<a href="{{ route('bewerbungen.show', $bewerbung) }}" class="btn btn-outline-secondary">Abbrechen</a>
|
||||
<button class="btn btn-primary">Speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,59 @@
|
||||
@extends('template')
|
||||
|
||||
@section('title', 'Bewerbungen')
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h1 class="h3">Bewerbungen</h1>
|
||||
<a href="{{ route('bewerbungen.create') }}" class="btn btn-primary">Neu</a>
|
||||
</div>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">{{ session('success') }}</div>
|
||||
@endif
|
||||
|
||||
<table class="table table-striped align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Aktiv</th>
|
||||
<th>Zeitraum</th>
|
||||
<th>Erstellt</th>
|
||||
<th class="text-end">Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($bewerbungen as $b)
|
||||
<tr>
|
||||
<td>{{ $b->id }}</td>
|
||||
<td>{{ $b->name }}</td>
|
||||
<td>
|
||||
<span class="badge {{ $b->active ? 'bg-success' : 'bg-secondary' }}">
|
||||
{{ $b->active ? 'Ja' : 'Nein' }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@if($b->start_at) {{ $b->start_at->format('d.m.Y H:i') }} @endif
|
||||
@if($b->end_at) – {{ $b->end_at->format('d.m.Y H:i') }} @endif
|
||||
</td>
|
||||
<td>{{ optional($b->created_at)->format('d.m.Y H:i') }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ route('bewerbungen.show', $b) }}" class="btn btn-sm btn-outline-secondary">Anzeigen</a>
|
||||
<a href="{{ route('bewerbungen.edit', $b) }}" class="btn btn-sm btn-outline-primary">Bearbeiten</a>
|
||||
<form action="{{ route('bewerbungen.destroy', $b) }}" method="POST" class="d-inline" onsubmit="return confirm('Wirklich löschen?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="btn btn-sm btn-outline-danger">Löschen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="6">Keine Bewerbungen vorhanden.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{ $bewerbungen->links() }}
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,44 @@
|
||||
@extends('template')
|
||||
|
||||
@section('title', 'Bewerbung anzeigen')
|
||||
@section('content')
|
||||
<div class="container mt-4">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">{{ session('success') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h1 class="h3 mb-0">{{ $bewerbung->name }}</h1>
|
||||
<div>
|
||||
<a href="{{ route('bewerbungen.edit', $bewerbung) }}" class="btn btn-sm btn-primary">Bearbeiten</a>
|
||||
<a href="{{ route('bewerbungen.index') }}" class="btn btn-sm btn-outline-secondary">Zur Liste</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p><strong>Aktiv:</strong> {{ $bewerbung->active ? 'Ja' : 'Nein' }}</p>
|
||||
<p><strong>Zeitraum:</strong>
|
||||
@if($bewerbung->start_at) {{ $bewerbung->start_at->format('d.m.Y H:i') }} @endif
|
||||
@if($bewerbung->end_at) – {{ $bewerbung->end_at->format('d.m.Y H:i') }} @endif
|
||||
</p>
|
||||
|
||||
<div class="mb-3">
|
||||
<strong>Text:</strong>
|
||||
<div class="border rounded p-3 bg-light mt-1">{{ $bewerbung->text }}</div>
|
||||
</div>
|
||||
|
||||
@if($bewerbung->pic_path)
|
||||
<p><strong>Bild:</strong> <br>
|
||||
<img src="{{ Storage::url($bewerbung->pic_path) }}" alt="" style="max-height:180px"></p>
|
||||
@endif
|
||||
|
||||
@if($bewerbung->bedingungen_path)
|
||||
<p><strong>Bewerbungsbedingungen:</strong> <a href="{{ Storage::url($bewerbung->bedingungen_path) }}" target="_blank">PDF öffnen</a></p>
|
||||
@endif
|
||||
|
||||
<form action="{{ route('bewerbungen.destroy', $bewerbung) }}" method="POST" class="mt-4" onsubmit="return confirm('Wirklich löschen?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button class="btn btn-outline-danger">Löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -3,7 +3,7 @@
|
||||
@section('title', 'Bewerbung erstellen')
|
||||
@section('content')
|
||||
<div class="formgroup">
|
||||
<form action="{{ route('bewerbung.store') }}" method="post" enctype="multipart/form-data" novalidate>
|
||||
<form action="{{ route('bewerbungen.store') }}" method="post" enctype="multipart/form-data" novalidate>
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6 mt-3">
|
||||
|
||||
Reference in new issue
Block a user