Files
laraundfelix/resources/views/member/content.blade.php
T
LarsandClaude Sonnet 5.5 9fbd933e1e Speichere formatierte Texte als bereinigtes HTML mit einem Editor (ADR-50)
Ein Baustein (FormattedText) bereinigt, bringt Werte in die kanonische Form und
wandelt Klartext des Altbestands; RichField ist der eine Editor, ManagesRichFields
verbindet ihn mit den Arbeitsplätzen. Formatiert sind Texte der Übungen und
Textbausteine, Kurzbeschreibung und Beschreibung, Lernziel und Ausstattung.
Mitgliederansicht und PDF zeigen fett, kursiv, Listen, Überschrift, Zitat und Link
(PDF: schräge Schnitte, nur wenn gebraucht). Das Livewire-Limit für verschachtelte
Pfade steigt auf 30, weil Aufzählungen sonst abgelehnt werden.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 23:45:54 +01:00

128 lines
6.7 KiB
PHP

@extends('layouts.member')
@section('title', $title)
@section('nav', 'bibliothek')
{{--
Film oder Material im fachlichen Zusammenhang (Kit 14, Entwurf 02/03). Der Weg zurück führt zum Modul oder Programm,
aus dem man kommt. Alle Adressen sind kurzlebig signierte Adressen der geschützten Medienwege; ohne Berechtigung
erscheint keine Adresse, nur der Hinweis (Antwortcode 403).
--}}
@section('content')
@php
$class = $node['output_class'];
$isFilm = $class === 'film';
$isAudio = $class === 'audio';
$type = $isFilm ? 'film' : 'material';
@endphp
<nav class="mb-crumb" aria-label="Weg zurück">
<a href="{{ $back['url'] }}"><x-heroicon-o-arrow-left aria-hidden="true" /> Zurück zu {{ $back['label'] }}</a>
@if (count($trail) > 1)
<ol class="mb-trail">
@foreach ($trail as $step)
<li><a href="{{ $step['url'] }}">{{ $step['label'] }}</a></li>
@endforeach
</ol>
@endif
</nav>
<header class="mb-content-head">
<x-member.type :type="$type" :label="$node['kind'] ?: ($isFilm ? 'Film' : 'Material')" />
<h1 class="mb-title">{{ $title }}</h1>
</header>
<div class="mb-content">
<div class="mb-content-main">
@if (! $allowed)
<div class="mb-locked" role="alert">
<x-heroicon-o-lock-closed aria-hidden="true" />
<div>
<h2>Nicht enthalten</h2>
<p>Für diesen Teil liegt in deinen Berechtigungen keine Freigabe vor. Welche Rechte du hast, siehst du unter <a href="{{ route('member.grants') }}">Meine Lizenzen</a>.</p>
</div>
</div>
@elseif ($isFilm || $isAudio)
<div class="mb-player player">
@if ($isAudio)
<audio controls preload="metadata" src="{{ $node['view_url'] }}"></audio>
@else
@include('content.video', [
'playback' => ['mode' => $node['playback'] ?? 'file', 'url' => $node['view_url']],
'poster' => $node['poster_url'] ?? null,
])
@endif
</div>
<div class="mb-actions">
@if (! $isAudio)
<button class="button button-secondary" type="button" data-fullscreen><x-heroicon-o-arrow-top-right-on-square aria-hidden="true" /> Vollbild</button>
@endif
@if ($node['download_url'])
<a class="button button-secondary" href="{{ $node['download_url'] }}"><x-heroicon-o-arrow-down-tray aria-hidden="true" /> Herunterladen</a>
@else
<span class="mb-hint"><x-heroicon-o-information-circle aria-hidden="true" /> Das Herunterladen ist in deinen Berechtigungen nicht enthalten.</span>
@endif
</div>
@else
<div class="mb-doc">
<x-heroicon-o-document-text aria-hidden="true" />
<div class="mb-actions">
<a class="button" href="{{ $node['view_url'] }}"><x-heroicon-o-eye aria-hidden="true" /> Ansehen</a>
@if ($node['download_url'])
<a class="button button-secondary" href="{{ $node['download_url'] }}"><x-heroicon-o-arrow-down-tray aria-hidden="true" /> Herunterladen</a>
@else
<span class="mb-hint"><x-heroicon-o-information-circle aria-hidden="true" /> Das Herunterladen ist in deinen Berechtigungen nicht enthalten.</span>
@endif
</div>
</div>
@endif
</div>
<aside class="mb-content-side">
@if (filled($summary_html) || filled($description_html))
<section class="mb-side-card" aria-labelledby="kurz">
<h2 id="kurz">Kurzbeschreibung</h2>
@if (filled($summary_html))
<div class="mb-prose">{!! $summary_html !!}</div>
@endif
@if (filled($description_html))
<div class="mb-prose">{!! $description_html !!}</div>
@endif
</section>
@endif
<section class="mb-side-card" aria-labelledby="begleit">
<h2 id="begleit">Begleitmaterial</h2>
@if ($companions === [])
<p class="mb-muted">In diesem Zusammenhang gibt es kein weiteres Material.</p>
@else
<ul class="mb-companions">
@foreach ($companions as $companion)
<li>
<x-heroicon-o-document-text aria-hidden="true" />
<span class="mb-companion-copy">
<span class="mb-companion-title">{{ $companion['title'] }}</span>
<span class="mb-muted">{{ $companion['kind'] ?: $companion['role'] }}</span>
</span>
@if ($companion['view_url'])
<span class="mb-companion-actions">
@if (in_array($companion['output_class'], ['film', 'audio'], true))
<a class="mb-icon-link" href="{{ $companion['content_url'] }}"><x-heroicon-o-play aria-hidden="true" /><span class="visually-hidden">Öffnen: {{ $companion['title'] }}</span></a>
@else
<a class="mb-icon-link" href="{{ $companion['view_url'] }}"><x-heroicon-o-eye aria-hidden="true" /><span class="visually-hidden">Ansehen: {{ $companion['title'] }}</span></a>
@endif
@if ($companion['download_url'])
<a class="mb-icon-link" href="{{ $companion['download_url'] }}"><x-heroicon-o-arrow-down-tray aria-hidden="true" /><span class="visually-hidden">Herunterladen: {{ $companion['title'] }}</span></a>
@endif
</span>
@else
<x-member.status state="nicht enthalten" />
@endif
</li>
@endforeach
</ul>
@endif
</section>
</aside>
</div>
@endsection