Abschnitte, Medienkarten, Einordnung und Auswahl folgen der vorgegebenen Form. Datenmodell und Fassungen bleiben unverändert.
107 lines
6.3 KiB
PHP
107 lines
6.3 KiB
PHP
<div class="luf-redaktion">
|
|
@if ($this->deskFeedback !== '')
|
|
<p class="luf-feedback" role="status">{{ $this->deskFeedback }}</p>
|
|
@endif
|
|
@if ($gaps = $this->editorialGaps())
|
|
<p class="luf-note">Noch ohne Angabe: {{ implode(', ', $gaps) }}.</p>
|
|
@endif
|
|
|
|
@php
|
|
$groups = [];
|
|
foreach ($this->presentationRows() as $row) {
|
|
$groups[$row['role']]['label'] = $row['role_label'];
|
|
$groups[$row['role']]['rows'][] = $row;
|
|
}
|
|
@endphp
|
|
|
|
@if ($groups === [])
|
|
<p class="luf-empty">Noch kein Präsentationsmedium. Das Vorschaubild der Bibliothek bleibt davon unabhängig.</p>
|
|
@else
|
|
@foreach ($groups as $slug => $group)
|
|
<section class="vw-rolle" aria-label="{{ $group['label'] }}">
|
|
<h3>{{ $group['label'] }} · {{ count($group['rows']) }} {{ count($group['rows']) === 1 ? 'Medium' : 'Medien' }}</h3>
|
|
<ul class="vw-zuordnungen {{ $slug === 'galerie' ? 'is-galerie' : '' }}"
|
|
x-data="{ from: null }"
|
|
@dragover.prevent>
|
|
@foreach ($group['rows'] as $index => $row)
|
|
<li wire:key="praesentation-{{ $row['id'] }}"
|
|
class="vw-karte"
|
|
draggable="{{ $row['ordered'] ? 'true' : 'false' }}"
|
|
@dragstart="from = {{ (int) $row['id'] }}"
|
|
@dragend="from = null"
|
|
@drop.prevent="if (from) { $wire.placePresentation(from, {{ (int) $row['id'] }}); from = null }">
|
|
@if ($row['ordered'])
|
|
<span class="vw-griff" aria-hidden="true">⋮⋮</span>
|
|
@endif
|
|
<span class="vw-daumen">
|
|
@if ($slug === 'galerie')
|
|
<span class="vw-nummer">{{ $index + 1 }}</span>
|
|
@endif
|
|
@if (! empty($row['image']))
|
|
<img src="{{ $row['image'] }}" alt="">
|
|
@else
|
|
<span class="vw-platzhalter">{{ $row['output'] !== '' ? $row['output'] : 'Medium' }}</span>
|
|
@endif
|
|
</span>
|
|
<span class="vw-karte-text">
|
|
<strong>{{ $row['title'] }}</strong>
|
|
@if ($row['kind'])
|
|
<span>{{ $row['kind'] }}</span>
|
|
@endif
|
|
@if ($row['standard'])
|
|
<span>Standard-Titelbild</span>
|
|
@endif
|
|
<span class="vw-freigabe {{ $row['released'] ? 'is-frei' : 'is-zurueck' }}">{{ $row['release_label'] }}</span>
|
|
@if ($row['binding'])
|
|
<span>{{ $row['binding']['label'] }}</span>
|
|
@else
|
|
<span>Eigenständiges Medium, ohne Bindung an eine Fassung.</span>
|
|
@endif
|
|
</span>
|
|
<span class="vw-karte-aktionen">
|
|
<a class="vw-textaktion" href="{{ \App\Filament\Resources\ContentElements\ContentElementResource::getUrl('view', ['record' => $row['element_id']]) }}">Quelle öffnen</a>
|
|
@if ($this->canEditEditorial())
|
|
<button type="button" class="luf-quiet" wire:click="beginExchange({{ $row['id'] }})">Austauschen</button>
|
|
@if ($row['ordered'])
|
|
<button type="button" class="luf-quiet" wire:click="movePresentation({{ $row['id'] }}, -1)" @disabled($index === 0) aria-label="{{ $row['title'] }} nach vorn">Nach vorn</button>
|
|
<button type="button" class="luf-quiet" wire:click="movePresentation({{ $row['id'] }}, 1)" @disabled($index === count($group['rows']) - 1) aria-label="{{ $row['title'] }} nach hinten">Nach hinten</button>
|
|
@endif
|
|
<button type="button" class="luf-quiet" wire:click="detachPresentation({{ $row['id'] }})">Zuordnung entfernen</button>
|
|
@if ($this->canReleasePresentation())
|
|
@if ($row['released'])
|
|
<button type="button" class="vw-textaktion" wire:click="withdrawAssigned({{ $row['element_id'] }})">Website-Freigabe zurücknehmen</button>
|
|
@else
|
|
<button type="button" class="vw-textaktion" wire:click="releaseAssigned({{ $row['element_id'] }})">Für die Website freigeben</button>
|
|
@endif
|
|
@endif
|
|
@endif
|
|
</span>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
</section>
|
|
@endforeach
|
|
@endif
|
|
|
|
<p class="vw-hinweisband">Entfernen löst nur diese Zuordnung. Das Medium bleibt im Bestand.</p>
|
|
|
|
@if ($this->canEditEditorial())
|
|
<div class="vw-naechste">
|
|
<label>Rolle für die nächste Zuordnung
|
|
<select wire:model.live="presentationRole">
|
|
@foreach ($this->presentationRoleOptions() as $slug => $label)
|
|
<option value="{{ $slug }}">{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
</label>
|
|
@if (in_array($this->presentationRole, \App\Domain\Catalog\PresentationRole::BOUND_ROLES, true))
|
|
<label class="vw-bindung">
|
|
<input type="checkbox" wire:model="bindToVersion">
|
|
Zusätzlich an der aktuellen Inhaltsfassung festhalten. Ohne Haken bleibt die Zuordnung am Medium. Eine spätere Fassung erzeugt keinen neuen Clip.
|
|
</label>
|
|
@endif
|
|
<p class="luf-note">Die tatsächliche Verwendung steht getrennt davon und wird nicht als Verwendungszweck gespeichert.</p>
|
|
</div>
|
|
@endif
|
|
</div>
|