Zeige Kurse im Mitgliederbereich und mach hochgeladene Fassungen ansehbar.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b374335b3a
commit
4f2e5a5f3b
24 files changed
+413
-47
No files matched your search
@@ -221,10 +221,30 @@ public function elementVersions(ContentElement $element): array
|
||||
return ['Noch keine Fassung.'];
|
||||
}
|
||||
|
||||
return $versions->map(function ($version): string {
|
||||
return $versions->flatMap(function ($version): array {
|
||||
$note = filled($version->change_note) ? ' · '.$version->change_note : '';
|
||||
$lines = ['Fassung '.$version->number.' · '.$this->status($version->status).$note];
|
||||
$metadata = is_array($version->metadata) ? $version->metadata : [];
|
||||
|
||||
return 'Fassung '.$version->number.' · '.$this->status($version->status).$note;
|
||||
if (filled($version->body)) {
|
||||
$lines[] = $version->body;
|
||||
}
|
||||
|
||||
if (is_string($metadata['file'] ?? null) && $metadata['file'] !== '') {
|
||||
$lines[] = 'Datei: '.basename($metadata['file']);
|
||||
} elseif (is_string($metadata['incoming'] ?? null) || is_array($metadata['incoming'] ?? null)) {
|
||||
$lines[] = 'Die Datei wird noch übernommen.';
|
||||
}
|
||||
|
||||
if (is_numeric($metadata['decision_seconds'] ?? null)) {
|
||||
$lines[] = 'Entscheidungsmarke bei '.(int) $metadata['decision_seconds'].' Sekunden';
|
||||
}
|
||||
|
||||
if (is_string($metadata['error'] ?? null) && $metadata['error'] !== '') {
|
||||
$lines[] = $metadata['error'];
|
||||
}
|
||||
|
||||
return $lines;
|
||||
})->all();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user