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>
112 lines
5.4 KiB
PHP
112 lines
5.4 KiB
PHP
@extends('layouts.member')
|
|
|
|
@section('title', $title)
|
|
@section('nav', $is_module ? 'bibliothek' : 'programme')
|
|
|
|
{{--
|
|
Programm- und Moduldetail (Kit 14, Entwurf 02). Kopf mit Bild und Kennzahlen, danach Überblick, Aufbau und Einsatz.
|
|
Abschnitte erscheinen nur, wenn die Fassung die Angabe enthält. Es gibt keinen Kursplayer und keinen „Programm starten“-Knopf:
|
|
Der Trainer wird nicht in eine feste Reihenfolge gezwungen (Fachkonzept §9).
|
|
--}}
|
|
@section('content')
|
|
@php
|
|
$hasOverview = filled($description_html) || filled($learning_goal);
|
|
$hasUse = filled($material_note);
|
|
$facts = [];
|
|
if ($module_count > 0) {
|
|
$facts[] = ['icon' => 'rectangle-stack', 'text' => $module_count.' '.($module_count === 1 ? 'Modul' : 'Module')];
|
|
}
|
|
if ($film_count > 0) {
|
|
$facts[] = ['icon' => 'play-circle', 'text' => $film_count.' '.($film_count === 1 ? 'Film' : 'Filme')];
|
|
}
|
|
if ($material_count > 0) {
|
|
$facts[] = ['icon' => 'document-text', 'text' => $material_count.' '.($material_count === 1 ? 'Material' : 'Materialien')];
|
|
}
|
|
if ($duration_minutes) {
|
|
$facts[] = ['icon' => 'clock', 'text' => 'ca. '.$duration_minutes.' Min. gesamt'];
|
|
}
|
|
@endphp
|
|
<p class="mb-crumb">
|
|
<a href="{{ $is_module ? route('member.library', ['art' => 'modul']) : route('member.programs') }}"><x-heroicon-o-arrow-left aria-hidden="true" /> Zur Bibliothek</a>
|
|
</p>
|
|
<header class="mb-detail-head">
|
|
<div class="mb-detail-visual">
|
|
@if ($picture)
|
|
<img src="{{ route('member.thumbnail', ['kind' => $picture['kind'], 'subject' => $picture['subject']]) }}" alt="{{ $picture['alt'] ?: '' }}">
|
|
@else
|
|
<span class="mb-card-placeholder" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.($is_module ? 'rectangle-stack' : 'squares-2x2')" /></span>
|
|
@endif
|
|
</div>
|
|
<div class="mb-detail-copy">
|
|
<x-member.type :type="$is_module ? 'modul' : 'programm'" :label="$kind" />
|
|
<h1 class="mb-title">{{ $title }} <x-brand.underline class="mb-title-line" /></h1>
|
|
@if (filled($summary_html))
|
|
<div class="mb-lede mb-prose">{!! $summary_html !!}</div>
|
|
@endif
|
|
<ul class="mb-facts">
|
|
@foreach ($facts as $fact)
|
|
<li><x-dynamic-component :component="'heroicon-o-'.$fact['icon']" aria-hidden="true" /> {{ $fact['text'] }}</li>
|
|
@endforeach
|
|
<li><x-member.status :state="$coverage" /></li>
|
|
</ul>
|
|
@if ($coverage === 'teilweise')
|
|
<p class="mb-note">Deine Berechtigungen decken {{ $open_count }} von {{ $leaf_count }} Teilen ab. Nicht enthaltene Teile bleiben gesperrt und sind unten gekennzeichnet.</p>
|
|
@elseif ($coverage === 'nicht enthalten')
|
|
<p class="mb-note">Für dieses {{ $is_module ? 'Modul' : 'Programm' }} liegt keine Berechtigung vor. Du siehst den Aufbau, aber keine Inhalte.</p>
|
|
@endif
|
|
@if (filled($composition->thumbnail_error))
|
|
<p class="mb-note">{{ $composition->thumbnail_error }}</p>
|
|
@endif
|
|
</div>
|
|
</header>
|
|
|
|
@if ($hasOverview || $hasUse)
|
|
<nav class="mb-anchors" aria-label="Auf dieser Seite">
|
|
@if ($hasOverview)<a href="#ueberblick">Überblick</a>@endif
|
|
<a href="#aufbau">{{ $is_module ? 'Inhalte' : 'Aufbau' }}</a>
|
|
@if ($hasUse)<a href="#einsatz">Einsatz & Vorbereitung</a>@endif
|
|
</nav>
|
|
@endif
|
|
|
|
@if ($hasOverview)
|
|
<section class="mb-section mb-overview {{ filled($description_html) && filled($learning_goal) ? '' : 'mb-overview-single' }}" id="ueberblick" aria-label="Überblick">
|
|
@if (filled($description_html))
|
|
<div class="mb-overview-text">
|
|
<h2 id="ueberblick-titel">Darum geht es</h2>
|
|
<div class="mb-prose">{!! $description_html !!}</div>
|
|
</div>
|
|
@endif
|
|
@if (filled($learning_goal))
|
|
<aside class="mb-goal" aria-labelledby="lernziel-titel">
|
|
<h3 id="lernziel-titel"><x-heroicon-o-check-circle aria-hidden="true" /> Lernziele</h3>
|
|
<div class="mb-prose">{!! \App\Domain\Catalog\FormattedText::display($learning_goal) !!}</div>
|
|
</aside>
|
|
@endif
|
|
</section>
|
|
@endif
|
|
|
|
<section class="mb-section" id="aufbau" aria-labelledby="aufbau-titel">
|
|
<div class="mb-section-head">
|
|
<h2 id="aufbau-titel">{{ $is_module ? 'Inhalte' : 'Aufbau' }}</h2>
|
|
</div>
|
|
@if ($nodes === [])
|
|
<div class="empty mb-empty">
|
|
<h2>Noch keine Inhalte</h2>
|
|
<p>In der angezeigten Fassung sind keine Inhalte enthalten.</p>
|
|
</div>
|
|
@else
|
|
@include('member.partials.structure', ['nodes' => $nodes])
|
|
@endif
|
|
</section>
|
|
|
|
@if ($hasUse)
|
|
<section class="mb-section" id="einsatz" aria-labelledby="einsatz-titel">
|
|
<h2 id="einsatz-titel">Einsatz & Vorbereitung</h2>
|
|
<div class="mb-note-card">
|
|
<h3>Material</h3>
|
|
<div class="mb-prose">{!! \App\Domain\Catalog\FormattedText::display($material_note) !!}</div>
|
|
</div>
|
|
</section>
|
|
@endif
|
|
@endsection
|