Public Access
Bewerbung inkativiren
This commit is contained in:
1 parent
c90d0dc806
commit
c0b853e457
2 files changed
+45
-2
No files matched your search
@@ -58,10 +58,14 @@ class BewerbungController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function form(Bewerbung $bewerbung)
|
public function form(Bewerbung $bewerbung)
|
||||||
{
|
{
|
||||||
return view('bewerbung.form', compact('bewerbung'));
|
if (! $bewerbung->active) {
|
||||||
|
return view('bewerbung.forminactive', compact('bewerbung'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return view('bewerbung.form', compact('bewerbung'));
|
||||||
|
}
|
||||||
|
|
||||||
public function update(Request $request, Bewerbung $bewerbung)
|
public function update(Request $request, Bewerbung $bewerbung)
|
||||||
{
|
{
|
||||||
$data = $request->validate([
|
$data = $request->validate([
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
@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 }} Form</h1>
|
||||||
|
<div>
|
||||||
|
<a href="{{ route('bewerbungen.edit', $bewerbung->id) }}" 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>
|
||||||
|
|
||||||
|
@if($bewerbung->pic_path)
|
||||||
|
<p><strong>Bild:</strong> <br>
|
||||||
|
<img src="{{ Storage::url($bewerbung->pic_path) }}" alt="" style="max-height:180px"></p>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Ab Hier Bewerbungsformular inaktiv
|
||||||
|
|
||||||
|
<div class="col-md-3"> </div><div id="head" class="col-md-6"> </div>
|
||||||
|
<div class="col-md-12"><div class="col-md-3"> </div><div class="col-md-4 col-lg-4">
|
||||||
|
<p>Diese Bewerbung ist Inaktiv</p>
|
||||||
|
|
||||||
|
</div><div class="col-md-3"> </div></div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
Reference in new issue
Block a user