Public Access
67 lines
2.6 KiB
PHP
67 lines
2.6 KiB
PHP
@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>
|
||
<div class="d-flex gap-2">
|
||
<a href="{{ route('bewerbungen.create') }}" class="btn btn-primary">Neu</a>
|
||
<form method="POST" action="{{ route('logout') }}">
|
||
@csrf
|
||
<button type="submit" class="btn btn-outline-secondary">Abmelden</button>
|
||
</form>
|
||
</div>
|
||
</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.form', $b) }}" class="btn btn-sm btn-outline-secondary">Form</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
|