Führe develop in den Branch zusammen; Abschnittseinstellungen tragen ADR-64, ADR-63 bleibt bei den Bildfassungen
CI Feature / test (push) Successful in 5m56s
CI Feature / test (push) Successful in 5m56s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
61c7c5c3d3
58 files changed
+1035
-84
No files matched your search
@@ -18,12 +18,14 @@
|
||||
use App\Domain\Catalog\LicenseArticle;
|
||||
use App\Domain\Catalog\OfferStatus;
|
||||
use App\Domain\Cms\Catalog\PublicMaterialReader;
|
||||
use App\Domain\Media\ThumbnailRef;
|
||||
use App\Filament\Resources\Combinations\CombinationResource;
|
||||
use App\Filament\Resources\ContentElements\ContentElementResource;
|
||||
use App\Filament\Resources\Courses\CourseResource;
|
||||
use App\Filament\Resources\Documents\DocumentResource;
|
||||
use App\Filament\Resources\Exercises\ExerciseResource;
|
||||
use App\Filament\Resources\Practices\PracticeResource;
|
||||
use Carbon\CarbonInterface;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -115,7 +117,7 @@ public function rowForTarget(string $target, int $exceptCompositionId, bool $all
|
||||
'usage_note' => (string) ($element->usage_note ?? ''),
|
||||
'license_note' => (string) ($element->license_note ?? ''),
|
||||
'tone' => $this->tone((string) $element->output_class, $kind),
|
||||
'image' => $this->cardUrl('element', $element->id, $element->thumbnail_path),
|
||||
'image' => $this->cardUrl('element', $element->id, $element->thumbnail_path, 'klein', $element->updated_at),
|
||||
'version_label' => match ($version->status) {
|
||||
ContentVersionStatus::Entwurf => 'Entwurf',
|
||||
ContentVersionStatus::Gesperrt => 'deaktiviert',
|
||||
@@ -163,7 +165,7 @@ public function rowForTarget(string $target, int $exceptCompositionId, bool $all
|
||||
'kind' => $kind,
|
||||
'summary' => FormattedText::plain((string) ($composition->summary ?? '')),
|
||||
'tone' => $this->tone('', $kind),
|
||||
'image' => $this->cardUrl('komposition', $composition->id, $composition->thumbnail_path),
|
||||
'image' => $this->cardUrl('komposition', $composition->id, $composition->thumbnail_path, 'klein', $composition->updated_at),
|
||||
'version_label' => $version->status === ContentVersionStatus::Gesperrt
|
||||
? 'deaktiviert'
|
||||
: 'Fassung '.$version->number,
|
||||
@@ -198,7 +200,7 @@ private function draftCompositionRow(int $compositionId, int $exceptCompositionI
|
||||
'kind' => $kind,
|
||||
'summary' => FormattedText::plain((string) ($composition->summary ?? '')),
|
||||
'tone' => $this->tone('', $kind),
|
||||
'image' => $this->cardUrl('komposition', $composition->id, $composition->thumbnail_path),
|
||||
'image' => $this->cardUrl('komposition', $composition->id, $composition->thumbnail_path, 'klein', $composition->updated_at),
|
||||
'version_label' => 'Entwurf',
|
||||
'identity' => 'zusammenstellung:'.$composition->id,
|
||||
'open_url' => route('editorial.draft-preview', ['composition' => $composition]),
|
||||
@@ -524,7 +526,7 @@ private function rowForPresentationMedium(int $id): ?array
|
||||
'license_note' => (string) ($element->license_note ?? ''),
|
||||
'tone' => $this->tone((string) $element->output_class, $kind),
|
||||
'image' => $element->output_class === 'bild'
|
||||
? $this->cardUrl('element', $element->id, $element->thumbnail_path)
|
||||
? $this->cardUrl('element', $element->id, $element->thumbnail_path, 'klein', $element->updated_at)
|
||||
: null,
|
||||
'version_label' => 'Ohne Inhaltsfassung',
|
||||
'committed' => false,
|
||||
@@ -548,13 +550,9 @@ public function tone(string $outputClass, string $kindLabel): string
|
||||
};
|
||||
}
|
||||
|
||||
public function cardUrl(string $kind, int $id, ?string $path): ?string
|
||||
public function cardUrl(string $kind, int $id, ?string $path, ?string $size = null, CarbonInterface|int|string|null $version = null): ?string
|
||||
{
|
||||
if (! is_string($path) || ! str_starts_with($path, 'vorschau/') || str_contains($path, '..')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return route('editorial.card', ['kind' => $kind, 'subject' => $id]);
|
||||
return ThumbnailRef::url('editorial.card', $kind, $id, $path, $size, $version);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -891,7 +889,7 @@ public function filmPictures(array $members): array
|
||||
continue;
|
||||
}
|
||||
|
||||
$image = $this->cardUrl('element', $element->id, $element->thumbnail_path);
|
||||
$image = $this->cardUrl('element', $element->id, $element->thumbnail_path, 'klein', $element->updated_at);
|
||||
|
||||
if ($image === null || isset($pictures[$element->id])) {
|
||||
continue;
|
||||
@@ -933,7 +931,7 @@ public function mediaPictures(string $query): array
|
||||
->limit(12)
|
||||
->get()
|
||||
->map(function (ContentElement $element): ?array {
|
||||
$image = $this->cardUrl('element', $element->id, $element->thumbnail_path);
|
||||
$image = $this->cardUrl('element', $element->id, $element->thumbnail_path, 'klein', $element->updated_at);
|
||||
|
||||
if ($image === null) {
|
||||
return null;
|
||||
@@ -957,7 +955,7 @@ public function mediaPictures(string $query): array
|
||||
*/
|
||||
public function cover(Composition $composition, array $members): array
|
||||
{
|
||||
$own = $this->cardUrl('komposition', $composition->id, $composition->thumbnail_path);
|
||||
$own = $this->cardUrl('komposition', $composition->id, $composition->thumbnail_path, 'mittel', $composition->updated_at);
|
||||
|
||||
if ($own !== null) {
|
||||
return ['url' => $own, 'note' => null, 'own' => true];
|
||||
@@ -970,7 +968,7 @@ public function cover(Composition $composition, array $members): array
|
||||
}
|
||||
|
||||
return [
|
||||
'url' => $this->cardUrl($picture['kind'], $picture['subject'], 'vorschau/gesetzt'),
|
||||
'url' => $this->cardUrl($picture['kind'], $picture['subject'], 'vorschau/gesetzt', 'mittel'),
|
||||
'note' => $picture['note'],
|
||||
'own' => false,
|
||||
];
|
||||
|
||||
@@ -553,7 +553,7 @@ private function card(ContentElement $element, array $portrait, array $uses, arr
|
||||
'description' => $description === '' ? null : $description,
|
||||
'usageNote' => $usageNote === '' ? null : $usageNote,
|
||||
'licenseNote' => $licenseNote === '' ? null : $licenseNote,
|
||||
'image' => ThumbnailRef::url('editorial.card', 'element', $element->id, $element->thumbnail_path),
|
||||
'image' => ThumbnailRef::url('editorial.card', 'element', $element->id, $element->thumbnail_path, 'klein', $element->updated_at),
|
||||
'imageAlt' => trim((string) ($element->thumbnail_alt ?: $element->working_title)),
|
||||
'imageNote' => $this->imageNote($element),
|
||||
'presentation' => $this->isPresentationMedium($element, $portrait['versionCount']),
|
||||
|
||||
Reference in new issue
Block a user