Eine Navigation (Meine Bibliothek, Programme, Meine Lizenzen, Konto-Menü) mit der freigegebenen Wortmarke, Startseite ohne erfundene Inhalte, Bibliothek mit Inhaltsart-Filter und einer Karte je Medienidentität („Verwendet in“), Programm-/Moduldetail, Film und Material im Zusammenhang mit Begleitmaterial und Weg zurück, Lizenzübersicht mit Detailseite je Berechtigung. Alle Größen aus der Größenskala (ADR-44, neues Token --card-min). Tests bewusst angepasst: Der Film spielt auf der Kontextseite statt eingebettet im Programm, Download-Links tragen ein Symbol, der Platzhalter ist ein dekoratives Element, die Wortmarke ist das freigegebene Logo. Die Vorschau der Bibliothekskarte in der Verwaltung nutzt dieselbe Komponente. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
131 lines
6.4 KiB
PHP
131 lines
6.4 KiB
PHP
@extends('layouts.member')
|
||
|
||
@php
|
||
$heading = match ($art) {
|
||
'programm' => 'Programme',
|
||
'modul' => 'Module',
|
||
'film' => 'Filme',
|
||
'material' => 'Materialien',
|
||
default => 'Meine Bibliothek',
|
||
};
|
||
$keep = array_filter(['q' => $query, 'sortierung' => $sortierung === 'titel' ? 'titel' : null, 'nutzung' => $nutzung ?: null, 'saeule' => $saeuleIds ?: null, 'dimension' => $dimensionIds ?: null]);
|
||
@endphp
|
||
|
||
@section('title', $heading)
|
||
@section('nav', $art === 'programm' ? 'programme' : 'bibliothek')
|
||
|
||
{{--
|
||
Bibliothek (Kit 14, Entwurf 02): Suche, Inhaltsart, Filter aus gepflegten Fachdimensionen, Karten.
|
||
Filter und Zahlen stammen aus den vorhandenen Daten (Säulen, Dimensionen, Berechtigungen); nichts ist festcodiert.
|
||
Ein Medium erscheint einmal, auch wenn es in mehreren Programmen steckt (Fachkonzept §6, Regel zur Mehrfachverwendung).
|
||
--}}
|
||
@section('content')
|
||
<x-member.hero :title="$heading">
|
||
Alle freigeschalteten Inhalte an einem Ort: suchen, filtern und direkt nutzen.
|
||
</x-member.hero>
|
||
|
||
<form class="mb-finder" method="get" action="{{ route('member.library') }}" role="search">
|
||
@if ($art !== '')
|
||
<input type="hidden" name="art" value="{{ $art }}">
|
||
@endif
|
||
<div class="mb-search">
|
||
<label class="visually-hidden" for="q">Inhalte suchen</label>
|
||
<x-heroicon-o-magnifying-glass aria-hidden="true" />
|
||
<input id="q" name="q" type="search" value="{{ $query }}" placeholder="Inhalte suchen …" autocomplete="off">
|
||
<button class="button" type="submit">Suchen</button>
|
||
</div>
|
||
|
||
<details class="mb-filter" @if ($filterCount > 0) open @endif>
|
||
<summary>
|
||
<x-heroicon-o-funnel aria-hidden="true" />
|
||
<span>Filter</span>
|
||
@if ($filterCount > 0)
|
||
<span class="mb-filter-count" aria-label="{{ $filterCount }} aktiv">{{ $filterCount }}</span>
|
||
@endif
|
||
</summary>
|
||
<div class="mb-filter-body">
|
||
@if ($filterPillars->isNotEmpty())
|
||
<fieldset>
|
||
<legend>Fachliche Säulen</legend>
|
||
@foreach ($filterPillars as $pillar)
|
||
<label class="mb-check">
|
||
<input type="checkbox" name="saeule[]" value="{{ $pillar->id }}" @checked(in_array($pillar->id, $saeuleIds, true))>
|
||
<span>{{ $pillar->name }}</span>
|
||
</label>
|
||
@endforeach
|
||
</fieldset>
|
||
@endif
|
||
@foreach ($filterDimensions as $dimension)
|
||
<fieldset>
|
||
<legend>{{ $dimension->label }}</legend>
|
||
@foreach ($dimension->values as $value)
|
||
<label class="mb-check">
|
||
<input type="checkbox" name="dimension[]" value="{{ $value->id }}" @checked(in_array($value->id, $dimensionIds, true))>
|
||
<span>{{ $value->label }}</span>
|
||
</label>
|
||
@endforeach
|
||
</fieldset>
|
||
@endforeach
|
||
<fieldset>
|
||
<legend>Verfügbarkeit</legend>
|
||
<label class="mb-check"><input type="radio" name="nutzung" value="" @checked($nutzung === '')> <span>Alle</span></label>
|
||
<label class="mb-check"><input type="radio" name="nutzung" value="nutzbar" @checked($nutzung === 'nutzbar')> <span>Verfügbar</span></label>
|
||
<label class="mb-check"><input type="radio" name="nutzung" value="teilweise" @checked($nutzung === 'teilweise')> <span>Teilweise verfügbar</span></label>
|
||
</fieldset>
|
||
<div class="mb-filter-apply">
|
||
<button class="button" type="submit">Filter anwenden</button>
|
||
</div>
|
||
</div>
|
||
</details>
|
||
|
||
<div class="mb-toolbar">
|
||
<nav class="mb-chips" aria-label="Inhaltsart">
|
||
<a class="mb-chip" href="{{ route('member.library', $keep) }}" @if ($art === '') aria-current="true" @endif>Alle ({{ $allCount }})</a>
|
||
@foreach ($types as $type => $label)
|
||
<a class="mb-chip" href="{{ route('member.library', $keep + ['art' => $type]) }}" @if ($art === $type) aria-current="true" @endif>{{ $label }} ({{ $counts[$type] }})</a>
|
||
@endforeach
|
||
</nav>
|
||
<label class="mb-sort">
|
||
<span>Sortierung</span>
|
||
<select name="sortierung" data-submit-on-change>
|
||
<option value="standard" @selected($sortierung === 'standard')>Reihenfolge der Lizenzen</option>
|
||
<option value="titel" @selected($sortierung === 'titel')>Titel A–Z</option>
|
||
</select>
|
||
</label>
|
||
</div>
|
||
</form>
|
||
|
||
<p class="mb-count" role="status" aria-live="polite">
|
||
{{ $total }} {{ $total === 1 ? 'Ergebnis' : 'Ergebnisse' }}
|
||
@if ($filterActive)
|
||
<a class="mb-reset" href="{{ route('member.library') }}"><x-heroicon-o-x-mark aria-hidden="true" /> Zurücksetzen</a>
|
||
@endif
|
||
</p>
|
||
|
||
@if ($total === 0)
|
||
<div class="empty mb-empty">
|
||
@if ($libraryEmpty)
|
||
<h2>Noch nichts in der Bibliothek</h2>
|
||
<p>Unter Angebote kannst du ein kostenloses Material abrufen oder ein Angebot im Testmodus kaufen.</p>
|
||
@else
|
||
<h2>Keine Treffer</h2>
|
||
<p>Für diese Suche oder Filterkombination liegt nichts in deiner Bibliothek. Setze die Filter zurück oder sieh dir die Angebote an.</p>
|
||
@endif
|
||
<p><a class="button" href="{{ route('member.offers') }}">Zu den Angeboten</a></p>
|
||
</div>
|
||
@else
|
||
@foreach ($shelves as $type => $shelf)
|
||
<section class="mb-section" aria-labelledby="regal-{{ $type }}">
|
||
<div class="mb-section-head">
|
||
<h2 id="regal-{{ $type }}">{{ $shelf['label'] }} <span class="mb-section-count">({{ count($shelf['cards']) }})</span></h2>
|
||
</div>
|
||
<div class="mb-grid">
|
||
@foreach ($shelf['cards'] as $card)
|
||
<x-member.card :card="$card" />
|
||
@endforeach
|
||
</div>
|
||
</section>
|
||
@endforeach
|
||
@endif
|
||
@endsection
|