Zeige den Medienbestand als Kacheln und Liste mit Fassung, Freigabe und Verwendung.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8a6678aad7
commit
3e56314cf9
8 files changed
+1511
-1
No files matched your search
@@ -0,0 +1,50 @@
|
||||
<article class="luf-medium luf-tone-{{ $card['typeKey'] }} {{ $list ? 'is-list' : 'is-tile' }}">
|
||||
<a class="luf-medium-figure" href="{{ $card['url'] }}" aria-label="{{ $card['title'] }} ansehen">
|
||||
@if ($card['image'])
|
||||
<img src="{{ $card['image'] }}" alt="{{ $card['imageAlt'] }}">
|
||||
@else
|
||||
@include('filament.media.mark', ['typeKey' => $card['typeKey'], 'type' => $card['type']])
|
||||
@endif
|
||||
@if ($card['imageNote'])
|
||||
<span class="luf-medium-figure-note">{{ $card['imageNote'] }}</span>
|
||||
@endif
|
||||
</a>
|
||||
<div class="luf-medium-body">
|
||||
<p class="luf-medium-kind">{{ $card['type'] }}</p>
|
||||
<a class="luf-medium-title" href="{{ $card['url'] }}">{{ $card['title'] }}</a>
|
||||
@if ($card['description'])
|
||||
<p class="luf-medium-copy">{{ $card['description'] }}</p>
|
||||
@endif
|
||||
@if ($card['usageNote'])
|
||||
<p class="luf-medium-copy luf-medium-note"><span class="luf-medium-kicker">Einsatz</span> {{ $card['usageNote'] }}</p>
|
||||
@endif
|
||||
@if ($card['licenseNote'])
|
||||
<p class="luf-medium-copy luf-medium-note"><span class="luf-medium-kicker">Interner Lizenzvermerk</span> {{ $card['licenseNote'] }}</p>
|
||||
@endif
|
||||
<div class="luf-medium-flags">
|
||||
<span class="luf-flag luf-flag-{{ $card['standTone'] }}">{{ $card['stand'] }}</span>
|
||||
@if ($card['draftNote'])
|
||||
<span class="luf-flag luf-flag-draft">{{ $card['draftNote'] }}</span>
|
||||
@endif
|
||||
@if ($card['blockedNote'])
|
||||
<span class="luf-flag luf-flag-blocked">{{ $card['blockedNote'] }}</span>
|
||||
@endif
|
||||
@if ($card['processing'])
|
||||
<span class="luf-flag luf-flag-wait">{{ $card['processing'] }}</span>
|
||||
@endif
|
||||
@if ($card['archived'])
|
||||
<span class="luf-flag luf-flag-quiet">Archiviert</span>
|
||||
@endif
|
||||
@if ($card['versionLabel'])
|
||||
<span class="luf-flag luf-flag-quiet">{{ $card['versionLabel'] }}</span>
|
||||
@endif
|
||||
</div>
|
||||
@include('filament.media.usages', ['card' => $card])
|
||||
<div class="luf-medium-actions">
|
||||
<a class="luf-medium-link" href="{{ $card['url'] }}">Ansehen</a>
|
||||
@if ($card['editUrl'])
|
||||
<a class="luf-medium-link" href="{{ $card['editUrl'] }}">Bearbeiten</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,259 @@
|
||||
<style>
|
||||
.luf-media {
|
||||
--luf-ink: #1b2838;
|
||||
--luf-pine: #0f6e56;
|
||||
--luf-paper: #f4f7f5;
|
||||
--luf-line: #c5d2cb;
|
||||
--luf-yellow: #e2b43a;
|
||||
--luf-quiet: #3e4c5c;
|
||||
color: var(--luf-ink);
|
||||
font-size: 1rem;
|
||||
line-height: 1.45;
|
||||
min-width: 0;
|
||||
}
|
||||
.luf-media * { box-sizing: border-box; }
|
||||
.luf-media a:focus-visible,
|
||||
.luf-media button:focus-visible,
|
||||
.luf-media input:focus-visible,
|
||||
.luf-media select:focus-visible,
|
||||
.luf-media summary:focus-visible {
|
||||
outline: 3px solid #1769aa;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.luf-media-bar,
|
||||
.luf-media-reset {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem 1rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 0 0.85rem;
|
||||
}
|
||||
.luf-media-switch { display: flex; flex-wrap: wrap; gap: 0.4rem; }
|
||||
.luf-media-quiet {
|
||||
font: inherit;
|
||||
color: var(--luf-ink);
|
||||
background: #fff;
|
||||
border: 1px solid var(--luf-line);
|
||||
min-height: 2.75rem;
|
||||
padding: 0.35rem 0.8rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.luf-media-quiet[aria-pressed="true"] {
|
||||
background: var(--luf-ink);
|
||||
color: #fff;
|
||||
border-color: var(--luf-ink);
|
||||
}
|
||||
.luf-media-count { margin: 0; color: var(--luf-quiet); }
|
||||
.luf-media-filters {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
|
||||
gap: 0.7rem 0.8rem;
|
||||
margin: 0 0 0.75rem;
|
||||
}
|
||||
.luf-media-field { display: grid; gap: 0.3rem; min-width: 0; }
|
||||
.luf-media-field.is-wide { grid-column: 1 / -1; }
|
||||
@media (min-width: 52rem) {
|
||||
.luf-media-field.is-wide { grid-column: span 2; }
|
||||
}
|
||||
.luf-media-field label { font-weight: 650; }
|
||||
.luf-media input,
|
||||
.luf-media select {
|
||||
width: 100%;
|
||||
min-height: 2.75rem;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
background: #fff;
|
||||
border: 1px solid var(--luf-line);
|
||||
padding: 0.45rem 0.65rem;
|
||||
}
|
||||
.luf-media-hint,
|
||||
.luf-media-loading {
|
||||
margin: 0 0 0.9rem;
|
||||
color: var(--luf-quiet);
|
||||
}
|
||||
.luf-media-empty {
|
||||
margin: 0 0 0.9rem;
|
||||
padding: 1rem 1.1rem;
|
||||
background: #fff;
|
||||
border: 1px dashed var(--luf-line);
|
||||
color: var(--luf-ink);
|
||||
}
|
||||
.luf-media-grid,
|
||||
.luf-media-rows {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
.luf-media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr));
|
||||
gap: 1rem;
|
||||
align-items: stretch;
|
||||
}
|
||||
.luf-media-rows { display: grid; gap: 0.7rem; }
|
||||
.luf-medium {
|
||||
background: #fff;
|
||||
border: 1px solid var(--luf-line);
|
||||
border-top: 4px solid var(--luf-pine);
|
||||
min-width: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.luf-medium.is-tile { display: flex; flex-direction: column; }
|
||||
.luf-medium.is-list {
|
||||
display: grid;
|
||||
grid-template-columns: 7.5rem minmax(0, 1fr);
|
||||
gap: 0.8rem;
|
||||
align-items: start;
|
||||
height: auto;
|
||||
}
|
||||
.luf-tone-film { border-top-color: #1b2838; }
|
||||
.luf-tone-document { border-top-color: #1769aa; }
|
||||
.luf-tone-text { border-top-color: #c4962a; }
|
||||
.luf-tone-audio { border-top-color: #6d4c7d; }
|
||||
.luf-tone-bild { border-top-color: var(--luf-pine); }
|
||||
.luf-medium-figure {
|
||||
display: block;
|
||||
position: relative;
|
||||
aspect-ratio: 16 / 9;
|
||||
background: var(--luf-paper);
|
||||
color: var(--luf-pine);
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
}
|
||||
.luf-medium.is-list .luf-medium-figure { aspect-ratio: 16 / 10; }
|
||||
.luf-medium-figure img,
|
||||
.luf-medium-mark,
|
||||
.luf-medium-mark svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.luf-medium-figure img { object-fit: cover; }
|
||||
.luf-medium-mark {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.luf-medium-mark svg { height: 72%; }
|
||||
.luf-medium-figure-note {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 0.35rem 0.55rem;
|
||||
background: rgba(27, 40, 56, 0.88);
|
||||
color: #fff;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
.luf-medium-body {
|
||||
display: grid;
|
||||
gap: 0.4rem;
|
||||
padding: 0.8rem 0.9rem 0.95rem;
|
||||
min-width: 0;
|
||||
}
|
||||
.luf-medium-kind {
|
||||
margin: 0;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
color: var(--luf-pine);
|
||||
}
|
||||
.luf-medium-title {
|
||||
color: inherit;
|
||||
font-family: Georgia, "Source Serif 4", serif;
|
||||
font-size: 1.28rem;
|
||||
font-weight: 650;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1.25;
|
||||
text-decoration: none;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.luf-medium-title:hover { text-decoration: underline; }
|
||||
.luf-medium-copy {
|
||||
margin: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.luf-medium.is-tile .luf-medium-copy {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 4;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.luf-medium-note { color: var(--luf-quiet); font-size: 0.92rem; }
|
||||
.luf-medium-kicker { font-weight: 700; color: var(--luf-ink); }
|
||||
.luf-medium-flags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
.luf-flag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 1.7rem;
|
||||
padding: 0.1rem 0.45rem;
|
||||
border: 1px solid var(--luf-line);
|
||||
background: #fff;
|
||||
font-size: 0.86rem;
|
||||
}
|
||||
.luf-flag-ready { background: #e7f3ee; border-color: var(--luf-pine); }
|
||||
.luf-flag-draft { background: #fff8e6; border-color: #c4962a; }
|
||||
.luf-flag-blocked { background: #f8f1ea; border-color: #8a5a2a; }
|
||||
.luf-flag-wait { background: #eef5fb; border-color: #1769aa; }
|
||||
.luf-flag-quiet { color: var(--luf-quiet); }
|
||||
.luf-medium-usage { display: grid; gap: 0.35rem; }
|
||||
.luf-medium-unused,
|
||||
.luf-medium-license { margin: 0; color: var(--luf-quiet); font-size: 0.92rem; }
|
||||
.luf-medium-usage summary {
|
||||
cursor: pointer;
|
||||
min-height: 2.4rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 650;
|
||||
}
|
||||
.luf-medium-usage ul {
|
||||
list-style: none;
|
||||
margin: 0.2rem 0 0;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
.luf-medium-usage li {
|
||||
display: grid;
|
||||
gap: 0.1rem;
|
||||
padding-top: 0.35rem;
|
||||
border-top: 1px solid var(--luf-line);
|
||||
min-width: 0;
|
||||
}
|
||||
.luf-medium-usage a { color: var(--luf-pine); overflow-wrap: anywhere; }
|
||||
.luf-medium-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem 1rem;
|
||||
margin-top: 0.15rem;
|
||||
}
|
||||
.luf-medium-link {
|
||||
color: var(--luf-ink);
|
||||
font-weight: 650;
|
||||
text-underline-offset: 0.18em;
|
||||
}
|
||||
.luf-sr {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
@media (max-width: 40rem) {
|
||||
.luf-medium.is-list { grid-template-columns: 5.5rem minmax(0, 1fr); }
|
||||
.luf-medium-title { font-size: 1.12rem; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.luf-media * { scroll-behavior: auto; }
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,135 @@
|
||||
@php
|
||||
$cards = $this->cards();
|
||||
$list = $this->showingList();
|
||||
$count = count($cards);
|
||||
@endphp
|
||||
|
||||
@include('filament.media.library-styles')
|
||||
|
||||
<div class="luf-media">
|
||||
<div class="luf-media-bar">
|
||||
<div class="luf-media-switch" role="group" aria-label="Ansicht">
|
||||
<button type="button" class="luf-media-quiet" wire:click="$set('ansicht', 'kacheln')" aria-pressed="{{ $list ? 'false' : 'true' }}">Kacheln</button>
|
||||
<button type="button" class="luf-media-quiet" wire:click="$set('ansicht', 'liste')" aria-pressed="{{ $list ? 'true' : 'false' }}">Liste</button>
|
||||
</div>
|
||||
<p class="luf-media-count" aria-live="polite">{{ $count === 1 ? '1 Medium' : $count.' Medien' }}</p>
|
||||
</div>
|
||||
|
||||
<div class="luf-media-filters">
|
||||
<div class="luf-media-field is-wide">
|
||||
<label for="medien-suche">Suche</label>
|
||||
<input id="medien-suche" type="search" wire:model.live.debounce.300ms="suche" placeholder="Titel oder Beschreibung">
|
||||
</div>
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-art">Art</label>
|
||||
<select id="medien-art" wire:model.live="art">
|
||||
<option value="">Alle Arten</option>
|
||||
@foreach ($this->typeOptions() as $type)
|
||||
<option value="{{ $type['value'] }}">{{ $type['label'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-freigabe">Freigabe</label>
|
||||
<select id="medien-freigabe" wire:model.live="freigabe">
|
||||
<option value="">Alle Freigaben</option>
|
||||
<option value="freigegeben">Freigegebene Fassung</option>
|
||||
<option value="entwurf">Nur offener Entwurf</option>
|
||||
<option value="ohne">Keine freigegebene Fassung</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-entwurf">Entwurf</label>
|
||||
<select id="medien-entwurf" wire:model.live="entwurf">
|
||||
<option value="">Entwurf egal</option>
|
||||
<option value="offen">Offener Entwurf</option>
|
||||
<option value="keiner">Kein offener Entwurf</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-fassung">Deaktivierte Fassungen</label>
|
||||
<select id="medien-fassung" wire:model.live="fassung">
|
||||
<option value="">Regulärer Bestand</option>
|
||||
<option value="mit">Mit deaktivierter Fassung</option>
|
||||
<option value="nur">Nur deaktivierte Fassungen</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-nutzung">Verwendung</label>
|
||||
<select id="medien-nutzung" wire:model.live="nutzung">
|
||||
<option value="">Verwendung egal</option>
|
||||
<option value="verwendet">Verwendet</option>
|
||||
<option value="unbenutzt">Nicht verwendet</option>
|
||||
</select>
|
||||
</div>
|
||||
@if ($pillars = $this->pillarOptions())
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-saeule">Fachliche Säule</label>
|
||||
<select id="medien-saeule" wire:model.live="saeule">
|
||||
<option value="">Alle Säulen</option>
|
||||
@foreach ($pillars as $pillar)
|
||||
<option value="{{ $pillar['id'] }}">{{ $pillar['name'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
@if ($classes = $this->classificationOptions())
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-einordnung">Einordnung</label>
|
||||
<select id="medien-einordnung" wire:model.live="einordnung">
|
||||
<option value="">Alle Einordnungen</option>
|
||||
@foreach ($classes as $class)
|
||||
<option value="{{ $class['id'] }}">{{ $class['label'] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-verarbeitung">Verarbeitung</label>
|
||||
<select id="medien-verarbeitung" wire:model.live="verarbeitung">
|
||||
<option value="">Verarbeitung egal</option>
|
||||
<option value="fehler">Verarbeitungsfehler</option>
|
||||
<option value="uebernahme">Datei wird übernommen</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="luf-media-field">
|
||||
<label for="medien-archiv">Archiv</label>
|
||||
<select id="medien-archiv" wire:model.live="archiv">
|
||||
<option value="aktiv">Aktive Medien</option>
|
||||
<option value="archiviert">Archivierte Medien</option>
|
||||
<option value="alle">Auch archivierte</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="luf-media-hint">Freigabe meint die Fassung des Mediums. Sie ist weder die Veröffentlichung auf der Website noch ein Nachweis, dass jemand das Medium öffnen darf. Medien, die nur noch deaktivierte Fassungen haben, und archivierte Medien bleiben über die Filter auffindbar.</p>
|
||||
|
||||
@if ($this->filtersActive())
|
||||
<p class="luf-media-reset">
|
||||
<button type="button" class="luf-media-quiet" wire:click="resetFilters">Filter zurücksetzen</button>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<p class="luf-media-loading" wire:loading.delay role="status">Die Übersicht wird aktualisiert.</p>
|
||||
|
||||
<div wire:loading.delay.class="is-pending" aria-busy="false">
|
||||
@if ($cards === [])
|
||||
<div class="luf-media-empty">
|
||||
@if ($this->filtersActive())
|
||||
<p>Keine Medien entsprechen der Auswahl.</p>
|
||||
<button type="button" class="luf-media-quiet" wire:click="resetFilters">Filter zurücksetzen</button>
|
||||
@else
|
||||
<p>Noch keine Medien im regulären Bestand.</p>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<ul class="{{ $list ? 'luf-media-rows' : 'luf-media-grid' }}" data-ansicht="{{ $list ? 'liste' : 'kacheln' }}">
|
||||
@foreach ($cards as $card)
|
||||
<li wire:key="medium-{{ $card['id'] }}">
|
||||
@include('filament.media.card', ['card' => $card, 'list' => $list])
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
<span class="luf-medium-mark" data-fallback="{{ $typeKey }}" aria-hidden="true">
|
||||
@switch($typeKey)
|
||||
@case('film')
|
||||
<svg viewBox="0 0 160 90">
|
||||
<rect x="18" y="22" width="124" height="46" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
<path d="M72 35 L98 45 L72 55 Z" fill="currentColor"/>
|
||||
</svg>
|
||||
@break
|
||||
@case('audio')
|
||||
<svg viewBox="0 0 160 90">
|
||||
<path d="M30 45 H46 L66 28 V62 L46 45 Z" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
<path d="M80 34 Q96 45 80 56 M96 26 Q122 45 96 64" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
</svg>
|
||||
@break
|
||||
@case('bild')
|
||||
<svg viewBox="0 0 160 90">
|
||||
<rect x="22" y="18" width="116" height="54" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
<circle cx="58" cy="38" r="7" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
<path d="M34 62 L62 44 L84 58 L104 40 L126 62" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
</svg>
|
||||
@break
|
||||
@case('document')
|
||||
<svg viewBox="0 0 160 90">
|
||||
<path d="M58 16 H96 L112 32 V74 H58 Z" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
<path d="M96 16 V32 H112 M70 46 H100 M70 58 H100" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
</svg>
|
||||
@break
|
||||
@default
|
||||
<svg viewBox="0 0 160 90">
|
||||
<path d="M36 28 H124 M36 45 H124 M36 62 H96" fill="none" stroke="currentColor" stroke-width="3"/>
|
||||
</svg>
|
||||
@endswitch
|
||||
<span class="luf-sr">{{ $type }}</span>
|
||||
</span>
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="luf-medium-usage">
|
||||
@if ($card['usages'] === [])
|
||||
<p class="luf-medium-unused">{{ $card['usageLabel'] }}</p>
|
||||
@else
|
||||
<details>
|
||||
<summary>{{ $card['usageLabel'] }}</summary>
|
||||
<ul>
|
||||
@foreach ($card['usages'] as $usage)
|
||||
<li>
|
||||
<span class="luf-medium-kicker">{{ $usage['type'] }}</span>
|
||||
<a href="{{ $usage['url'] }}">{{ $usage['name'] }}</a>
|
||||
<span>Medium {{ $usage['mediumVersion'] }}, eingesetzt in {{ $usage['hostVersion'] }}@if ($usage['roles'] !== []) · {{ implode(', ', $usage['roles']) }}@endif</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</details>
|
||||
@endif
|
||||
@if ($card['licenseText'])
|
||||
<p class="luf-medium-license">{{ $card['licenseText'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
Reference in new issue
Block a user