Files
laraundfelix/resources/views/member/library.blade.php
T
LarsandCursor c99a957e6f
Deploy Test / test (push) Successful in 17s
Deploy Test / deploy (push) Successful in 22s
Zeige Nutzbarkeit, Didaktik und oeffentliche Programmfassung
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-16 08:33:19 +01:00

49 lines
2.2 KiB
PHP

@extends('layouts.site')
@section('title', 'Bibliothek')
@section('content')
@include('member.partials.nav')
<h1>Bibliothek</h1>
<form method="get" action="{{ route('member.library') }}">
<label for="q">Suche</label>
<input id="q" name="q" type="search" value="{{ $query ?? '' }}">
<button class="button" type="submit">Suchen</button>
@if (filled($query ?? null))
<a href="{{ route('member.library') }}">Zurücksetzen</a>
@endif
</form>
<p class="lede">Programme zeigen den Aufbau. Einzelne Materialien stehen darunter, solange sie zu keinem freigegebenen Programm gehören.</p>
@if ($programs === [] && $materials === [])
<div class="empty">
<p>Noch nichts in der Bibliothek. Unter Angebote können Sie ein kostenloses Material abrufen oder ein Angebot im Testmodus kaufen.</p>
<p><a class="button" href="{{ route('member.offers') }}">Zu den Angeboten</a></p>
</div>
@else
@if ($programs !== [])
<h2>Programme und Module</h2>
<ul class="catalog">
@foreach ($programs as $program)
<li>
<a href="{{ route('member.program', $program['composition']) }}"><strong>{{ $program['kind'] ? $program['kind'].': ' : '' }}{{ $program['title'] }}</strong></a>
<span>{{ filled($program['composition']->thumbnail_path) ? ($program['composition']->thumbnail_alt ?: 'Vorschaubild') : 'Platzhalter' }}</span>
@if (filled($program['composition']->thumbnail_error))
<span>{{ $program['composition']->thumbnail_error }}</span>
@endif
</li>
@endforeach
</ul>
@endif
@if ($materials !== [])
<h2>Materialien</h2>
<ul class="catalog">
@foreach ($materials as $material)
<li>
<a href="{{ route('member.article', $material['article']) }}"><strong>{{ $material['kind'] ? $material['kind'].': ' : '' }}{{ $material['title'] }}</strong></a>
</li>
@endforeach
</ul>
@endif
@endif
@endsection