Mache den Medieneditor breit, ruhig und mit lesbaren Registerkarten.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d37a7093dd
commit
72130d66c5
9 files changed
+187
-175
No files matched your search
@@ -28,6 +28,7 @@
|
||||
use Filament\Resources\Pages\ViewRecord;
|
||||
use Filament\Schemas\Components\View;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Enums\Width;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
|
||||
@@ -98,18 +99,28 @@ public function mount(int|string $record): void
|
||||
$this->fassung = $requested;
|
||||
}
|
||||
|
||||
$bereich = (string) request()->query('bereich', 'inhalt');
|
||||
$this->bereich = in_array($bereich, ['beschreibung', 'inhalt', 'fassungen', 'herkunft', 'verwendung', 'auswahl', 'vorschau'], true)
|
||||
$bereich = (string) request()->query('bereich', 'beschreibung');
|
||||
$this->bereich = in_array($bereich, ['beschreibung', 'inhalt', 'fassungen', 'verwendung', 'vorschau'], true)
|
||||
? $bereich
|
||||
: 'inhalt';
|
||||
: 'beschreibung';
|
||||
$this->thumbnailAlt = (string) ($this->getRecord()->thumbnail_alt ?? '');
|
||||
$this->fillEditorial();
|
||||
$this->syncBodyDraft();
|
||||
}
|
||||
|
||||
public function getHeading(): string|Htmlable
|
||||
{
|
||||
return (string) $this->getRecord()->working_title;
|
||||
}
|
||||
|
||||
public function getSubheading(): string|Htmlable|null
|
||||
{
|
||||
return 'Beschreibung, Anzeigename, Kurzbeschreibung und Vorschaubild gehören zum Medium und ändern keine Fassung. Eine neue Film- oder Textdatei entsteht nur über eine neue Fassung. Die Website zeigt nur, was dafür freigegeben ist.';
|
||||
return 'Texte und Vorschaubild ändern keine Fassung. Eine neue Datei oder ein geänderter Lehrtext braucht eine neue Fassung.';
|
||||
}
|
||||
|
||||
public function getMaxContentWidth(): Width|string|null
|
||||
{
|
||||
return Width::Full;
|
||||
}
|
||||
|
||||
public function infolist(Schema $schema): Schema
|
||||
|
||||
@@ -8,56 +8,56 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
<div class="luf-ws">
|
||||
<div>
|
||||
@if ($this->editorialFeedback !== '')
|
||||
<p role="status">{{ $this->editorialFeedback }}</p>
|
||||
<p class="luf-editor-status" role="status">{{ $this->editorialFeedback }}</p>
|
||||
@endif
|
||||
|
||||
@if ($fokus === 'beschreibung')
|
||||
<div class="luf-ws-grid">
|
||||
<form class="luf-ws" wire:submit="saveEditorial">
|
||||
<p>Diese Angaben gehören zum Medium. Speichern legt keine Film- oder Dokumentfassung an. Dieselben Texte nutzen Verwaltung, Mitgliederbereich und Website, soweit die jeweilige Oberfläche sie zeigt.</p>
|
||||
<label>Arbeitstitel
|
||||
<input type="text" wire:model.live.debounce.300ms="workingTitle" @disabled(! $editable) required>
|
||||
<span class="luf-help">Nur in der Verwaltung. Auf Karten erscheint er, wenn kein Anzeigename gepflegt ist.</span>
|
||||
</label>
|
||||
<label>Anzeigename
|
||||
<input type="text" wire:model.live.debounce.300ms="displayTitle" @disabled(! $editable)>
|
||||
<span class="luf-help">Titel der Website-Karte und der Bibliothekskarte.</span>
|
||||
</label>
|
||||
<label>Kurzbeschreibung
|
||||
<textarea wire:model.live.debounce.300ms="summary" @disabled(! $editable)></textarea>
|
||||
<span class="luf-help">Text der Kacheln, auch auf schmalen Karten. Die Website zeigt diese Kurzbeschreibung, nicht die ausführliche Beschreibung.</span>
|
||||
</label>
|
||||
<label>Beschreibung
|
||||
<textarea wire:model.live.debounce.300ms="descriptionText" @disabled(! $editable)></textarea>
|
||||
<span class="luf-help">Ausführlicher Text in der Verwaltung. Er erscheint nicht auf der öffentlichen Karte.</span>
|
||||
</label>
|
||||
<label>Einsatzhinweis
|
||||
<textarea wire:model.live.debounce.300ms="usageNote" @disabled(! $editable)></textarea>
|
||||
<span class="luf-help">Interner Hinweis für die Redaktion. Keine Produktlizenz und nicht öffentlich.</span>
|
||||
</label>
|
||||
<label>Inhaltsart
|
||||
<select wire:model.live="kindId" @disabled(! $editable)>
|
||||
<option value="">Keine eigene Inhaltsart</option>
|
||||
@foreach ($options['kinds'] as $id => $label)
|
||||
<option value="{{ $id }}">{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="luf-help">Fachliche Art, zum Beispiel Traineranleitung. Traineranleitungen erscheinen nie öffentlich.</span>
|
||||
</label>
|
||||
<div class="luf-editor-split">
|
||||
<form wire:submit="saveEditorial">
|
||||
<p class="luf-editor-lead">Karten zeigen den Anzeigenamen und die Kurzbeschreibung. Die ausführliche Beschreibung und der Vermerk bleiben in der Verwaltung.</p>
|
||||
<div class="luf-editor-fields">
|
||||
<label>Arbeitstitel
|
||||
<input type="text" wire:model.live.debounce.300ms="workingTitle" @disabled(! $editable) required>
|
||||
</label>
|
||||
<label>Anzeigename
|
||||
<input type="text" wire:model.live.debounce.300ms="displayTitle" @disabled(! $editable)>
|
||||
</label>
|
||||
<label class="is-wide">Kurzbeschreibung
|
||||
<textarea rows="3" wire:model.live.debounce.300ms="summary" @disabled(! $editable)></textarea>
|
||||
</label>
|
||||
<label class="is-wide">Beschreibung
|
||||
<textarea rows="6" wire:model.live.debounce.300ms="descriptionText" @disabled(! $editable)></textarea>
|
||||
</label>
|
||||
<label>Hinweise für den Einsatz
|
||||
<textarea rows="4" wire:model.live.debounce.300ms="usageNote" @disabled(! $editable)></textarea>
|
||||
</label>
|
||||
<label>Interner Lizenzvermerk
|
||||
<textarea rows="4" wire:model="licenseNote" @disabled(! $editable)></textarea>
|
||||
</label>
|
||||
<label>Inhaltsart
|
||||
<select wire:model.live="kindId" @disabled(! $editable)>
|
||||
<option value="">Keine</option>
|
||||
@foreach ($options['kinds'] as $id => $label)
|
||||
<option value="{{ $id }}">{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Fachliche Säulen</legend>
|
||||
<div class="luf-ws-checks">
|
||||
<div class="luf-editor-checks">
|
||||
@foreach ($options['pillars'] as $pillar)
|
||||
<label><input type="checkbox" value="{{ $pillar->id }}" wire:model="pillarIds" @disabled(! $editable)> {{ $pillar->name }}</label>
|
||||
@endforeach
|
||||
</div>
|
||||
</fieldset>
|
||||
@foreach ($options['dimensions'] as $dimension)
|
||||
@continue($dimension->slug === 'saeule')
|
||||
<fieldset>
|
||||
<legend>{{ $dimension->label }}</legend>
|
||||
<div class="luf-ws-checks">
|
||||
<div class="luf-editor-checks">
|
||||
@foreach ($dimension->values as $value)
|
||||
<label><input type="checkbox" value="{{ $value->id }}" wire:model="dimensionIds" @disabled(! $editable)> {{ $value->label }}</label>
|
||||
@endforeach
|
||||
@@ -65,124 +65,30 @@
|
||||
</fieldset>
|
||||
@endforeach
|
||||
@if ($editable)
|
||||
<button type="submit">Angaben speichern</button>
|
||||
<p><button class="luf-editor-save" type="submit">Speichern</button></p>
|
||||
@endif
|
||||
@php($history = $this->editorialHistory())
|
||||
@if ($history !== [])
|
||||
<details>
|
||||
<summary>Letzte Änderungen</summary>
|
||||
<ul>
|
||||
@foreach ($history as $change)
|
||||
<li>{{ $change['when'] }} · {{ $change['field'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</details>
|
||||
@endif
|
||||
</form>
|
||||
@include('filament.media.preview-frame')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($fokus === 'herkunft')
|
||||
<form class="luf-ws" wire:submit="saveEditorial">
|
||||
<p>Die Rechte am Medium sind von den Lizenzen zu unterscheiden, die später an Käufer vergeben werden. Eine freigegebene Fassung macht das Medium nicht öffentlich.</p>
|
||||
<label>Interner Lizenzvermerk
|
||||
<textarea wire:model="licenseNote" @disabled(! $editable)></textarea>
|
||||
<span class="luf-help">Nur in der Verwaltung. Quelle, Urheber und Einschränkungen der Nutzung dieses Mediums.</span>
|
||||
</label>
|
||||
<label>Einsatzhinweis
|
||||
<textarea wire:model="usageNote" @disabled(! $editable)></textarea>
|
||||
</label>
|
||||
@if ($editable)
|
||||
<button type="submit">Herkunft speichern</button>
|
||||
@endif
|
||||
</form>
|
||||
<h2>Änderungen an den Angaben</h2>
|
||||
@php($history = $this->editorialHistory())
|
||||
@if ($history === [])
|
||||
<p>Noch keine protokollierte Änderung.</p>
|
||||
@else
|
||||
<ul>
|
||||
@foreach ($history as $change)
|
||||
<li>{{ $change['when'] }} · {{ $change['field'] }}@if ($change['after'] !== '') · {{ \Illuminate\Support\Str::limit($change['after'], 80) }}@endif</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($fokus === 'verwendung')
|
||||
@php($card = $this->usageCard())
|
||||
<p>Eine Verwendung verweist auf eine konkrete Fassung. Die Rolle steht an der Verwendung, nicht als Kopie des Mediums.</p>
|
||||
@include('filament.media.usages', ['card' => $card])
|
||||
@endif
|
||||
|
||||
@if ($fokus === 'auswahl')
|
||||
<p>Dieselbe Auswahl wie im Modul und Programm. Der Zusammenhang bestimmt, was sinnvoll ist. Entwürfe bleiben im Modul sichtbar, damit die gemeinsame Freigabe weiter möglich ist.</p>
|
||||
<div class="luf-scopes" role="group" aria-label="Zusammenhang">
|
||||
@foreach (['modul' => 'Modul oder Programm', 'bild' => 'Vorschaubild', 'website' => 'Website'] as $value => $label)
|
||||
<button type="button" class="luf-quiet" wire:click="$set('pickerContext', '{{ $value }}')" aria-pressed="{{ $this->pickerContext === $value ? 'true' : 'false' }}">{{ $label }}</button>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="luf-scopes" role="group" aria-label="Darstellung">
|
||||
<button type="button" class="luf-quiet" wire:click="$set('pickerLayout', 'kacheln')" aria-pressed="{{ $this->pickerLayout === 'kacheln' ? 'true' : 'false' }}">Kacheln</button>
|
||||
<button type="button" class="luf-quiet" wire:click="$set('pickerLayout', 'liste')" aria-pressed="{{ $this->pickerLayout === 'liste' ? 'true' : 'false' }}">Liste</button>
|
||||
</div>
|
||||
<label>Suche
|
||||
<input type="search" wire:model.live.debounce.250ms="pickerQuery" placeholder="Titel oder Beschreibung">
|
||||
</label>
|
||||
@if ($this->pickerContext === 'bild')
|
||||
<p class="luf-note">Nur Bilder. Filme und Texte sind hier nicht wählbar, weil sie kein Vorschaubild des Bestands sind.</p>
|
||||
@elseif ($this->pickerContext === 'website')
|
||||
<p class="luf-note">Für die Website zählen nur freigegebene Präsentationsdaten. Eine Auswahl hier veröffentlicht nichts. Geschützte Dateien bleiben geschützt. Das Widget der Website nutzt dieselben Regeln.</p>
|
||||
@else
|
||||
<p class="luf-note">Filme, Texte, Dokumente und Module. Entwürfe sind dabei, eine freigegebene Fassung ist gekennzeichnet.</p>
|
||||
@endif
|
||||
@php($result = $this->selection())
|
||||
<div class="luf-picker">
|
||||
@if ($result['items'] === [])
|
||||
<p class="luf-empty">Nichts gefunden.</p>
|
||||
@else
|
||||
<ul @class(['luf-cards', 'luf-cards-list' => $this->pickerLayout === 'liste'])>
|
||||
@foreach ($result['items'] as $hit)
|
||||
<li wire:key="auswahl-{{ $hit['target'] }}">
|
||||
<button type="button" class="luf-card luf-tone-{{ $hit['tone'] ?? 'text' }}" wire:click="$set('pickerSelected', '{{ $hit['target'] }}')" aria-pressed="{{ $this->pickerSelected === $hit['target'] ? 'true' : 'false' }}">
|
||||
<span class="luf-figure">
|
||||
@if (! empty($hit['image']))
|
||||
<img src="{{ $hit['image'] }}" alt="">
|
||||
@else
|
||||
<span class="luf-sr">Kein Titelbild</span>
|
||||
@endif
|
||||
</span>
|
||||
<span class="luf-card-body">
|
||||
<span class="luf-kind">{{ $hit['kind'] }}</span>
|
||||
<strong>{{ $hit['title'] }}</strong>
|
||||
<span class="luf-meta">{{ $hit['version_label'] }}</span>
|
||||
@if (filled($hit['visibility'] ?? null))
|
||||
<span class="luf-note">{{ $hit['visibility'] }}</span>
|
||||
@endif
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<aside class="luf-detail">
|
||||
@if ($detail = $this->selectionDetail())
|
||||
<p class="luf-kicker">{{ $detail['kind'] }}</p>
|
||||
<h3>{{ $detail['title'] }}</h3>
|
||||
<p>{{ $detail['version_label'] }}</p>
|
||||
@if (filled($detail['visibility'] ?? null))
|
||||
<p>{{ $detail['visibility'] }}</p>
|
||||
@endif
|
||||
@if ($this->pickerContext === 'bild' && $editable)
|
||||
<button type="button" wire:click="adoptLibraryImage">Als Vorschaubild übernehmen</button>
|
||||
@if ($this->pictureFeedback !== '')
|
||||
<p role="status">{{ $this->pictureFeedback }}</p>
|
||||
@endif
|
||||
@elseif ($this->pickerContext === 'website')
|
||||
<p class="luf-note">Die Karte auf der Website liest Anzeigename und Kurzbeschreibung aus diesem Medium. Die Datei wird nicht verlinkt.</p>
|
||||
@else
|
||||
<p class="luf-note">Im Modul übernimmst du diese Fassung in den Aufbau. Hier wird nichts eingebaut.</p>
|
||||
@endif
|
||||
@if ($detail['edit_url'] ?? null)
|
||||
<p><a href="{{ $detail['edit_url'] }}">In der Verwaltung öffnen</a></p>
|
||||
@endif
|
||||
@else
|
||||
<p>Wähle einen Eintrag.</p>
|
||||
@endif
|
||||
</aside>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($fokus === 'vorschau')
|
||||
<p>Die Vorschau nutzt die Website-Karte und die Karte der Bibliothek. Ein Bibliotheksbild ist in der Vorschau sichtbar und damit nicht öffentlich freigegeben. Die ausführliche Beschreibung erscheint auf diesen Karten nicht.</p>
|
||||
@include('filament.media.preview-frame')
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
<style>
|
||||
.luf-editor {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
color: #1b2838;
|
||||
font-size: 1rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.luf-editor-tabs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.15rem 0.35rem;
|
||||
border-bottom: 1px solid #c5d2cb;
|
||||
margin: 0 0 1.25rem;
|
||||
}
|
||||
.luf-editor-tabs button {
|
||||
appearance: none;
|
||||
font: inherit;
|
||||
font-weight: 650;
|
||||
color: #1b2838;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 3px solid transparent;
|
||||
margin: 0 0 -1px;
|
||||
padding: 0.7rem 0.95rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.luf-editor-tabs button[aria-selected="true"] {
|
||||
color: #0f6e56;
|
||||
background: transparent;
|
||||
border-bottom-color: #0f6e56;
|
||||
}
|
||||
.luf-editor-tabs button:focus-visible {
|
||||
outline: 3px solid #1769aa;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.luf-editor-lead {
|
||||
margin: 0 0 1rem;
|
||||
color: #3e4c5c;
|
||||
}
|
||||
.luf-editor-split {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(32rem, 1fr) minmax(20rem, 28rem);
|
||||
gap: 1.75rem;
|
||||
align-items: start;
|
||||
}
|
||||
.luf-editor-fields {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.9rem 1.1rem;
|
||||
}
|
||||
.luf-editor-fields .is-wide { grid-column: 1 / -1; }
|
||||
.luf-editor label {
|
||||
display: grid;
|
||||
gap: 0.3rem;
|
||||
font-weight: 650;
|
||||
}
|
||||
.luf-editor input[type="text"],
|
||||
.luf-editor input[type="search"],
|
||||
.luf-editor textarea,
|
||||
.luf-editor select {
|
||||
font: inherit;
|
||||
font-weight: 450;
|
||||
width: 100%;
|
||||
color: #1b2838;
|
||||
background: #fff;
|
||||
border: 1px solid #c5d2cb;
|
||||
padding: 0.55rem 0.7rem;
|
||||
min-height: 2.75rem;
|
||||
}
|
||||
.luf-editor textarea { min-height: 6.5rem; resize: vertical; }
|
||||
.luf-editor-checks {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.45rem 1.1rem;
|
||||
margin: 0.35rem 0 0;
|
||||
}
|
||||
.luf-editor-checks label {
|
||||
font-weight: 450;
|
||||
grid-auto-flow: column;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
}
|
||||
.luf-editor-save {
|
||||
justify-self: start;
|
||||
font: inherit;
|
||||
font-weight: 650;
|
||||
color: #fff;
|
||||
background: #0f6e56;
|
||||
border: 0;
|
||||
min-height: 2.75rem;
|
||||
padding: 0.55rem 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.luf-editor-status {
|
||||
margin: 0 0 0.8rem;
|
||||
padding: 0.65rem 0.8rem;
|
||||
background: #e7f3ee;
|
||||
border-left: 4px solid #0f6e56;
|
||||
}
|
||||
.luf-live-preview-stage { width: 100%; overflow: hidden; }
|
||||
.luf-live-preview-frame { border: 0; transform-origin: top left; display: block; background: #fff; }
|
||||
@media (max-width: 1100px) {
|
||||
.luf-editor-split { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 720px) {
|
||||
.luf-editor-fields { grid-template-columns: 1fr; }
|
||||
}
|
||||
</style>
|
||||
@@ -256,20 +256,4 @@
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.luf-media * { scroll-behavior: auto; }
|
||||
}
|
||||
.luf-ws-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
|
||||
.luf-ws-tabs button { min-height: 2.75rem; padding: 0.35rem 0.8rem; border: 1px solid var(--luf-line); background: #fff; color: var(--luf-ink); }
|
||||
.luf-ws-tabs button[aria-pressed="true"] { background: var(--luf-pine); color: #fff; border-color: var(--luf-pine); }
|
||||
.luf-ws { display: grid; gap: 1rem; max-width: 72rem; }
|
||||
.luf-ws-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 24rem); gap: 1.25rem; align-items: start; }
|
||||
.luf-ws label { display: grid; gap: 0.25rem; font-weight: 600; }
|
||||
.luf-ws input[type="text"], .luf-ws input[type="search"], .luf-ws textarea, .luf-ws select { font: inherit; width: 100%; min-height: 2.75rem; border: 1px solid var(--luf-line); background: #fff; padding: 0.4rem 0.6rem; }
|
||||
.luf-ws textarea { min-height: 6rem; }
|
||||
.luf-ws .luf-help { font-weight: 400; color: #3d4f45; }
|
||||
.luf-ws-checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
|
||||
.luf-ws-checks label { font-weight: 400; grid-auto-flow: column; align-items: center; }
|
||||
.luf-live-preview-stage { width: 100%; overflow: hidden; }
|
||||
.luf-live-preview-frame { border: 0; transform-origin: top left; display: block; background: #fff; }
|
||||
@media (max-width: 860px) {
|
||||
.luf-ws-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
</style>
|
||||
@@ -7,7 +7,6 @@
|
||||
<button type="button" wire:click="$set('previewWidth', '640')" aria-pressed="{{ $this->previewWidth === '640' ? 'true' : 'false' }}">Desktop</button>
|
||||
<button type="button" wire:click="$set('previewWidth', '390')" aria-pressed="{{ $this->previewWidth === '390' ? 'true' : 'false' }}">Mobil</button>
|
||||
</div>
|
||||
<p class="luf-help">Die Website-Karte zeigt Anzeigename oder Arbeitstitel und die Kurzbeschreibung. Die Bibliothekskarte zeigt dieselben Angaben. Ob ein Mitglied sie öffnen darf, entscheidet die Lizenz, nicht diese Vorschau.</p>
|
||||
@include('filament.cms.widget-live-preview', [
|
||||
'html' => $this->previewHtml(),
|
||||
'stylesheets' => \App\Filament\Support\WidgetEditor::previewStylesheets(),
|
||||
|
||||
@@ -3,24 +3,23 @@
|
||||
$fokus = $this->bereich;
|
||||
@endphp
|
||||
|
||||
<div class="luf-editor">
|
||||
@include('filament.media.library-styles')
|
||||
@include('filament.editorial.styles')
|
||||
@include('filament.media.editor-styles')
|
||||
|
||||
<nav class="luf-ws-tabs" aria-label="Bereiche des Mediums">
|
||||
<nav class="luf-editor-tabs" role="tablist" aria-label="Bereiche des Mediums">
|
||||
@foreach ([
|
||||
'beschreibung' => 'Beschreibung',
|
||||
'inhalt' => 'Inhalt',
|
||||
'fassungen' => 'Fassungen',
|
||||
'herkunft' => 'Herkunft',
|
||||
'verwendung' => 'Verwendung',
|
||||
'auswahl' => 'Auswahl',
|
||||
'vorschau' => 'Vorschau',
|
||||
] as $value => $label)
|
||||
<button type="button" wire:click="$set('bereich', '{{ $value }}')" aria-pressed="{{ $fokus === $value ? 'true' : 'false' }}">{{ $label }}</button>
|
||||
<button type="button" role="tab" wire:click="$set('bereich', '{{ $value }}')" aria-selected="{{ $fokus === $value ? 'true' : 'false' }}">{{ $label }}</button>
|
||||
@endforeach
|
||||
</nav>
|
||||
|
||||
@if (in_array($fokus, ['beschreibung', 'herkunft', 'verwendung', 'auswahl', 'vorschau'], true))
|
||||
@if (in_array($fokus, ['beschreibung', 'verwendung', 'vorschau'], true))
|
||||
@include('filament.media.editor-panels')
|
||||
@else
|
||||
<div style="display: grid; gap: 1.5rem;">
|
||||
@@ -186,3 +185,4 @@
|
||||
} catch (error) {}
|
||||
};
|
||||
</script>
|
||||
</div>
|
||||
@@ -96,7 +96,7 @@ public function test_catalog_pages_show_contents_packages_and_resolved_rights():
|
||||
$sheet->load('element');
|
||||
|
||||
$this->actingAs($editor, 'staff')
|
||||
->get(ContentElementResource::getUrl('view', ['record' => $sheet->element]))
|
||||
->get(ContentElementResource::getUrl('view', ['record' => $sheet->element]).'?bereich=inhalt')
|
||||
->assertOk()
|
||||
->assertSee('Hinweis für die Prüfung.')
|
||||
->assertSee('Fassung 1')
|
||||
|
||||
@@ -46,6 +46,7 @@ public function test_a_medium_keeps_the_old_version_when_a_new_one_is_saved(): v
|
||||
$this->actingAs($editor, 'staff');
|
||||
|
||||
Livewire::test(ViewContentElement::class, ['record' => $element->getKey()])
|
||||
->set('bereich', 'inhalt')
|
||||
->assertOk()
|
||||
->assertSee('Erste Fassung')
|
||||
->assertSee('Fassung 1')
|
||||
@@ -204,7 +205,7 @@ public function test_a_catalog_keeper_cannot_edit_media(): void
|
||||
$version = app(ContentService::class)->publishElementVersion($element, 'Sichtbarer Text');
|
||||
|
||||
$this->actingAs($keeper, 'staff')
|
||||
->get(ContentElementResource::getUrl('view', ['record' => $element]))
|
||||
->get(ContentElementResource::getUrl('view', ['record' => $element]).'?bereich=inhalt')
|
||||
->assertOk()
|
||||
->assertSee('Fassung 1')
|
||||
->assertSee('Sichtbarer Text')
|
||||
@@ -236,6 +237,7 @@ public function test_a_description_does_not_create_a_version_and_an_older_versio
|
||||
$this->assertSame('Für die Gruppe', $element->fresh()->description);
|
||||
|
||||
Livewire::test(ViewContentElement::class, ['record' => $element->getKey()])
|
||||
->set('bereich', 'inhalt')
|
||||
->assertSee('Fassung 1')
|
||||
->assertSee('Fassung 2')
|
||||
->assertSee('<video', false)
|
||||
@@ -342,6 +344,7 @@ public function jpegAtVersion(ContentElementVersion $version, float $seconds): ?
|
||||
|
||||
Livewire::actingAs($editor, 'staff')
|
||||
->test(ViewContentElement::class, ['record' => $element->getKey()])
|
||||
->set('bereich', 'inhalt')
|
||||
->assertSee('Diese Stelle übernehmen')
|
||||
->call('adoptFrame')
|
||||
->assertSet('pictureFeedback', 'Wähle zuerst eine Zeitposition.')
|
||||
@@ -456,6 +459,7 @@ public function test_staff_players_use_the_stored_film_ladder(): void
|
||||
|
||||
Livewire::actingAs($editor, 'staff')
|
||||
->test(ViewContentElement::class, ['record' => $version->element->getKey()])
|
||||
->set('bereich', 'inhalt')
|
||||
->assertSee('data-hls="'.$playlist.'"', false)
|
||||
->assertSee(route('content.file', $version), false);
|
||||
|
||||
@@ -482,6 +486,7 @@ public function test_a_draft_medium_can_be_released_from_its_editor(): void
|
||||
|
||||
Livewire::actingAs($editor, 'staff')
|
||||
->test(ViewContentElement::class, ['record' => $version->content_element_id])
|
||||
->set('bereich', 'inhalt')
|
||||
->assertSee('noch nicht freigegeben')
|
||||
->mountAction('releaseVersion', ['version' => $version->id])
|
||||
->callMountedAction();
|
||||
@@ -491,6 +496,7 @@ public function test_a_draft_medium_can_be_released_from_its_editor(): void
|
||||
|
||||
Livewire::actingAs($editor, 'staff')
|
||||
->test(ViewContentElement::class, ['record' => $version->content_element_id])
|
||||
->set('bereich', 'inhalt')
|
||||
->assertSee('freigegeben')
|
||||
->assertDontSee('Fassung freigeben');
|
||||
$this->assertSame(1, $version->element->fresh()->versions()->count());
|
||||
|
||||
@@ -88,18 +88,15 @@ public function test_the_picker_keeps_drafts_for_modules_and_limits_images_and_w
|
||||
$modulePicker->assertSee('Entwürfe bleiben sichtbar');
|
||||
|
||||
$page = Livewire::test(ViewContentElement::class, ['record' => $film->element->getKey()])
|
||||
->set('bereich', 'auswahl')
|
||||
->set('pickerContext', 'bild');
|
||||
$imageTitles = array_column($page->instance()->selection()['items'], 'title');
|
||||
$this->assertContains('Szenenbild', $imageTitles);
|
||||
$this->assertNotContains('Lara im Park', $imageTitles);
|
||||
$page->assertSee('Nur Bilder');
|
||||
|
||||
$page->set('pickerContext', 'website');
|
||||
$websiteTitles = array_column($page->instance()->selection()['items'], 'title');
|
||||
$this->assertContains('Offener Entwurf', $websiteTitles);
|
||||
$this->assertNotContains('Abstand', $websiteTitles);
|
||||
$page->assertSee('veröffentlicht nichts');
|
||||
|
||||
$target = null;
|
||||
foreach ($page->instance()->selection()['items'] as $item) {
|
||||
@@ -110,7 +107,7 @@ public function test_the_picker_keeps_drafts_for_modules_and_limits_images_and_w
|
||||
$page->set('pickerContext', 'bild')
|
||||
->set('pickerSelected', $target)
|
||||
->call('adoptLibraryImage')
|
||||
->assertSee('keine neue Fassung');
|
||||
->assertSet('pictureFeedback', 'Vorschaubild übernommen. Es gibt keine neue Fassung. Für die Website ist es damit nicht freigegeben.');
|
||||
|
||||
$film->element->refresh();
|
||||
$this->assertSame('vorschau/szenenbild.jpg', $film->element->thumbnail_path);
|
||||
|
||||
Reference in new issue
Block a user