2017-09-14 10:01:21 +02:00

50 lines
1.4 KiB
PHP

@extends('layouts.app')
@section('title', 'Veranstaltungen')
@section('content')
<table class="highlight">
<thead>
<tr>
<th class="centered">Name</th>
<th class="centered">Datum</th>
<th class="centered">Zeit</th>
<th class="centered">Eingetragen</th>
<th></th>
</tr>
</thead>
@foreach ($veranstaltungen as $v)
<tr >
<td>{{ $v->name }}</td>
<td>{{ $v->beginn->format('d.m.Y') }}</td>
<td>{{ $v->beginn->format('H:i') }}</td>
<td class="centered">
@if(!$v->ist_eingetragen)
<a class="btn-flat waves-effect waves-green" href="{{ route('veranstaltung.enter', [$v]) }}">Eintragen</a>
@else
<span class="green-text tooltipped" title="Du bist schon eingetragen"><i class="material-icons">check</i></span>
@endif
</td>
<td class="row">
<a class="btn-flat waves-effect" href="{{ route('veranstaltung.show', [$v]) }}">Details</a>
<a class="btn-flat waves-effect" href="{{ route('veranstaltung.edit', [$v]) }}">Bearbeiten</a>
<a class="btn-flat waves-effect wave-red red-text modal-trigger" href="#confirmDeletionModal" data-url="{{route('veranstaltung.destroy', $v)}}" data-identifier="{{$v->name}}"><i class="material-icons">delete</i></button>
</td>
</tr>
@endforeach
</table>
@endsection
@php
$fabActions = [
[
'icon' => "add",
'link' => route('veranstaltung.create'),
'color' => "red"
]
];
@endphp
@push('modals')
@include('shared.modals.confirmDeletion', [])
@endpush