@extends('layouts.master') @section('content')
@if (Gate::allows('admin-mode')) @lang('descriptions.emergency-message.list.admin') @else @lang('descriptions.emergency-message.list') @endif
@if (Gate::allows('admin-mode'))
Notfall Status: @if (Helper::isEmergencyMode()) AKTIVIERT @else DEAKTIVIERT @endif
@if (!Helper::isEmergencyMode()) @if ($active_message)
Notfall aktivieren
@else
Notfall aktivieren
@endif @else
Notfall deaktivieren
@endif
@endif @if (count($list) === 0) Vorlagen @endif @if (Gate::allows('user-mode') && Helper::isEmergencyMode())
Zentrale Notfallkommunikation
@endif
@foreach ($list as $entry) @php $status_names = array("aktiviert", "deaktiviert", "in Bearbeitung", "Freigabe angefordert", "abgelehnt"); $approval_request = $entry->approval_request(); @endphp
{{ $entry->title }}
Status: {{ $status_names[$approval_request->status - 1] }} | zuletzt geändert am {{ date('d.m.Y', strtotime($entry->updated_at)) }}
@if ((!Helper::isEmergencyMode() && Gate::allows('admin-mode')) || Gate::allows('user-mode')) id]) }}" class="red-button">bearbeiten @endif @if ($approval_request->status === 1)
vorschau
@endif @if ((!Helper::isEmergencyMode() && Gate::allows('admin-mode')) || Gate::allows('user-mode'))
id]) }}" class="red-button delete-entry">löschen
@endif @if($approval_request->status === 4) id]) }}" class="red-button">Genehmigungsstatus zurücksetzen @endif
@for($i=1;$i<=count($status_names);$i++) @php $active_in_future = false; if($i === 2 && $approval_request->status === $i && $entry->valid_start !== "" && strtotime($entry->valid_start." 00:00:00") > time()){ $active_in_future = true; } @endphp
{{ $status_names[$i-1] }} @if($approval_request->status === $i && $i === 4) [ von {{ Helper::getUsername($approval_request->sent_to) }} ] @endif @if($active_in_future) [ Wird aktiviert am {{ date('d.m.Y', strtotime($entry->valid_start)) }} ] @endif
@endfor
@endforeach
@endsection @section('back_button') Zurück @endsection