118 lines
6.4 KiB
PHP
118 lines
6.4 KiB
PHP
@php
|
|
use App\Domain\Catalog\ContentVersionStatus;
|
|
@endphp
|
|
|
|
<div style="display: grid; gap: 1.5rem;">
|
|
<section style="display: grid; gap: 0.75rem;">
|
|
<h2 style="font-size: 1.125rem; font-weight: 600;">{{ $element->working_title }}</h2>
|
|
@if (filled($element->description))
|
|
<p>{{ $element->description }}</p>
|
|
@else
|
|
<p>Noch keine Beschreibung. Beschreibung, Arbeitstitel und Säulen lassen sich ändern, ohne eine neue Fassung anzulegen.</p>
|
|
@endif
|
|
@if (filled($element->usage_note))
|
|
<h3 style="font-size: 1rem; font-weight: 600;">Hinweise für den Einsatz</h3>
|
|
<p>{{ $element->usage_note }}</p>
|
|
@endif
|
|
@if (filled($element->license_note))
|
|
<h3 style="font-size: 1rem; font-weight: 600;">Interner Lizenzvermerk</h3>
|
|
<p>{{ $element->license_note }}</p>
|
|
@endif
|
|
<p>{{ $pillars === [] ? 'Keiner Säule zugeordnet.' : implode(' · ', $pillars) }}</p>
|
|
</section>
|
|
|
|
@if ($canRevise || $pictureUrl)
|
|
<section style="display: grid; gap: 0.75rem; max-width: 40rem;">
|
|
<h2 style="font-size: 1.125rem; font-weight: 600;">Vorschaubild</h2>
|
|
<p>Gilt für die Anzeige dieses Mediums und als Vorschlag in Modulen und Programmen, solange die dort kein eigenes Titelbild haben. Eine Inhaltsfassung entsteht dabei nicht.</p>
|
|
@if ($pictureUrl)
|
|
<img src="{{ $pictureUrl }}" alt="{{ $element->thumbnail_alt ?: $element->working_title }}" style="width: 100%; max-width: 28rem; height: auto; background: #111;">
|
|
@else
|
|
<p>Noch kein Vorschaubild.</p>
|
|
@endif
|
|
@if ($pictureCaption !== '')
|
|
<p>{{ $pictureCaption }}</p>
|
|
@endif
|
|
@if ($this->pictureFeedback !== '')
|
|
<p role="status">{{ $this->pictureFeedback }}</p>
|
|
@endif
|
|
@if ($canRevise)
|
|
<label for="bild-alternativ">Alternativtext</label>
|
|
<input id="bild-alternativ" type="text" wire:model="thumbnailAlt" placeholder="Was das Bild zeigt">
|
|
@if ($element->output_class === 'film' && $shown)
|
|
<div x-data="{ second: {{ json_encode($this->frameSecond) }} }">
|
|
<label for="filmstelle">Zeitposition in Sekunden</label>
|
|
<input id="filmstelle" type="range" min="0" max="120" step="0.5" x-model="second" @change="$wire.set('frameSecond', second)">
|
|
<input type="number" min="0" max="7200" step="0.1" x-model="second" @change="$wire.set('frameSecond', second)" aria-label="Zeitposition als Zahl">
|
|
</div>
|
|
<p>Die Vorschau nimmt die kleine Filmstufe, sofern sie vorliegt. Die Filmdatei selbst bleibt unverändert.</p>
|
|
@if ($frameUrl = $this->framePreviewUrl())
|
|
<img src="{{ $frameUrl }}" alt="Vorschau der gewählten Filmstelle" style="width: 100%; max-width: 28rem; height: auto;">
|
|
@endif
|
|
<button type="button" wire:click="adoptFrame">Diese Stelle übernehmen</button>
|
|
@endif
|
|
@if ($element->output_class === 'bild')
|
|
<button type="button" wire:click="useOwnImage">Die Bilddatei verwenden</button>
|
|
@endif
|
|
<label for="vorschau-bild">Eigenes Vorschaubild</label>
|
|
<input id="vorschau-bild" type="file" accept="image/png,image/jpeg,image/webp" wire:model="previewUpload">
|
|
<button type="button" wire:click="storePreview">Bild übernehmen</button>
|
|
@endif
|
|
</section>
|
|
@endif
|
|
|
|
<section style="display: grid; gap: 0.75rem;">
|
|
@if ($shown === null)
|
|
<p>Noch keine Fassung.</p>
|
|
@else
|
|
<h2 style="font-size: 1.125rem; font-weight: 600;">Fassung {{ $shown->number }}</h2>
|
|
@include('content.player', ['version' => $shown, 'fileUrl' => $fileUrl, 'pending' => $pending])
|
|
@if (! $fileUrl && ! $pending && blank($shown->body) && ! is_string((is_array($shown->metadata) ? $shown->metadata : [])['file'] ?? null))
|
|
<p>Für diese Fassung liegt noch kein Text und keine Datei vor.</p>
|
|
@endif
|
|
@endif
|
|
</section>
|
|
|
|
<section style="display: grid; gap: 0.75rem;">
|
|
<h2 style="font-size: 1.125rem; font-weight: 600;">Fassungen</h2>
|
|
@if ($versions->isEmpty())
|
|
<p>Noch keine Fassung.</p>
|
|
@else
|
|
<ul style="display: grid; gap: 0.75rem; list-style: none; padding: 0; margin: 0;">
|
|
@foreach ($versions as $version)
|
|
@php
|
|
$status = match ($version->status) {
|
|
ContentVersionStatus::Gesperrt => 'deaktiviert',
|
|
ContentVersionStatus::Entwurf => 'Entwurf',
|
|
default => 'bereit',
|
|
};
|
|
@endphp
|
|
<li style="display: grid; gap: 0.35rem; padding: 0.75rem 0; border-top: 1px solid rgba(0,0,0,0.12);">
|
|
<strong>Fassung {{ $version->number }}</strong>
|
|
<span>{{ $status }}@if (filled($version->change_note)) · {{ $version->change_note }}@endif</span>
|
|
@if (filled($version->block_reason))
|
|
<span>Begründung: {{ $version->block_reason }}</span>
|
|
@endif
|
|
<span style="display: flex; flex-wrap: wrap; gap: 0.75rem;">
|
|
<button type="button" wire:click="showVersion({{ $version->id }})">Fassung {{ $version->number }} ansehen</button>
|
|
<a href="{{ route('content.preview', $version) }}" target="_blank" rel="noopener">Im eigenen Tab</a>
|
|
@if ($canRevise && $version->status === ContentVersionStatus::Bereit)
|
|
<button type="button" wire:click="mountAction('deactivate', { version: {{ $version->id }} })">Deaktivieren</button>
|
|
@endif
|
|
</span>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
@endif
|
|
</section>
|
|
|
|
@if ($usage !== [])
|
|
<section style="display: grid; gap: 0.35rem;">
|
|
<h2 style="font-size: 1.125rem; font-weight: 600;">Verwendung</h2>
|
|
@foreach ($usage as $line)
|
|
<p>{{ $line }}</p>
|
|
@endforeach
|
|
</section>
|
|
@endif
|
|
</div>
|