Zeige freigegebene Programme als Aufbau in der Bibliothek
Deploy Test / test (push) Successful in 17s
Deploy Test / deploy (push) Successful in 21s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-16 08:09:37 +01:00
1 parent fc08e6d0f2
commit 7b54c38623
7 files changed
+307 -22

No files matched your search

+22 -16
View File
@@ -4,27 +4,33 @@
@section('content')
@include('member.partials.nav')
@inject('courses', App\Http\CourseOutline::class)
<h1>Bibliothek</h1>
<p class="lede">Jede Berechtigung öffnet ein Programm, ein Modul oder ein einzelnes Material.</p>
@if ($grants->isEmpty())
<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
<ul class="catalog">
@foreach ($grants as $grant)
<li>
<a href="{{ route('member.article', $grant->article) }}"><strong>{{ $courses->kindLabel($grant->article) ? $courses->kindLabel($grant->article).': ' : '' }}{{ $courses->title($grant->article) }}</strong></a>
@if ($grant->article->currentRelease?->classification_note)
<span>{{ $grant->article->currentRelease->classification_note }}</span>
@endif
@if ($grant->article->currentRelease?->change_note)
<span>{{ $grant->article->currentRelease->change_note }}</span>
@endif
</li>
@endforeach
</ul>
@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>
</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
@@ -0,0 +1,27 @@
<ol class="course">
@foreach ($nodes as $node)
<li>
<h2>{{ $node['role'] }}: {{ $node['title'] }}</h2>
@if ($node['kind'])
<p>{{ $node['kind'] }}</p>
@endif
@if ($node['output_class'] === 'film' || $node['output_class'] === 'audio')
@if ($node['view_url'])
<video controls preload="metadata" playsinline src="{{ $node['view_url'] }}"></video>
@else
<p>Für diesen Film liegt keine Freigabe vor.</p>
@endif
@elseif ($node['view_url'])
<p><a href="{{ $node['view_url'] }}">Ansehen</a></p>
@elseif ($node['children'] === [])
<p>Für diesen Teil liegt keine Freigabe vor.</p>
@endif
@if ($node['download_url'])
<p><a href="{{ $node['download_url'] }}">Laden</a></p>
@endif
@if ($node['children'] !== [])
@include('member.partials.structure', ['nodes' => $node['children']])
@endif
</li>
@endforeach
</ol>
+13
View File
@@ -0,0 +1,13 @@
@extends('layouts.site')
@section('title', $title)
@section('content')
@include('member.partials.nav')
<p><a href="{{ route('member.library') }}">Bibliothek</a></p>
<h1>{{ $title }}</h1>
@if ($kind)
<p>{{ $kind }}</p>
@endif
@include('member.partials.structure', ['nodes' => $nodes])
@endsection