@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)) }} | {!! Helper::getValidityText($entry) !!}
@if (strpos($entry::$url, "/") !== false) @if (strpos($entry::$url, "quiz") !== false) id, 1]) }}" class="red-button">bearbeiten @else id]) }}" class="red-button">bearbeiten @endif @else id]) }}" class="red-button">bearbeiten @endif @if ($approval_request->status === 1 && Helper::showPreviewButton(get_class($entry)))
vorschau
@endif @if (strpos($entry::$url, "/") !== false)
id]) }}" class="red-button delete-entry">löschen
@else
id]) }}" class="red-button delete-entry">löschen
@endif @if (strpos(get_class($entry), "Voting") !== false) @if ($entry->archived === 0)
id]) }}" class="red-button archive-entry">archivieren
@endif @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