48 lines
1.5 KiB
PHP
48 lines
1.5 KiB
PHP
@extends('layout')
|
|
|
|
@section('content')
|
|
<h1>Veranstaltungen bearbeiten</h1>
|
|
<a href="{{url('admin/events/create')}}" class="btn btn-success">Veranstaltung hinzufügen</a>
|
|
|
|
|
|
<table class="ui celled table">
|
|
<thead>
|
|
<tr>
|
|
<th>Titel</th>
|
|
<th>Top</th>
|
|
<th colspan="3">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($events as $event)
|
|
<tr>
|
|
<td>{{ $event->title }}</td>
|
|
<td>
|
|
@if($event->pinned)
|
|
X
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@foreach($event->seat as $seat)
|
|
<a href="/admin/eventoverview/{{$seat->id}}" target="_self" class="btn btn-secondary" style="margin-bottom: 10px;">Übersicht {{$seat->date}}</a><br />
|
|
@endforeach
|
|
@if(count($event->seat) == 0)
|
|
Kein Kartenverkauf
|
|
@endif
|
|
</td>
|
|
|
|
|
|
<td><a href="{{route('events.edit',$event->id)}}" class="btn btn-warning">Bearbeiten</a></td>
|
|
<td>
|
|
{!! Form::open(['method' => 'DELETE', 'route'=>['events.destroy', $event->id], 'onsubmit' => 'return confirm("Willst du die Veranstaltung wirklich löschen?")']) !!}
|
|
{!! Form::submit('Löschen', ['class' => 'btn btn-danger']) !!}
|
|
{!! Form::close() !!}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
@endsection
|