Führe Übungen als Fassungen mit Varianten, Verwendung und Mitgliederausgabe ein
CI Feature / test (push) Successful in 3m32s
CI Feature / test (push) Successful in 3m32s
Neuer kind 'exercise', Varianten je Fassung, Verwendung (erforderlich/ergänzend) und Variantenauswahl am einbindenden Mitglied; der Stand schreibt nur gewählte Varianten fest. Änderungsnachweis über structure_hash. Formatierte Anleitung im Mitgliederbereich und PDF (Fußzeile, Metadaten, Ausgabenachweis, keine gespeicherten Kopien); Sperre trifft nur das Medium. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ef56befc0e
commit
d1f97a351a
26 files changed
+1628
-15
No files matched your search
@@ -0,0 +1,106 @@
|
||||
@extends('layouts.member')
|
||||
|
||||
@section('title', $guide['title'])
|
||||
@section('nav', 'bibliothek')
|
||||
|
||||
{{--
|
||||
Übung als formatierte Anleitung im erworbenen Stand. Gezeigt wird die im Stand gebundene Fassung mit den dort
|
||||
angebotenen Varianten. Über jeden Abschnitt und jedes Medium entscheidet die zentrale Rechteprüfung: Was fehlt oder
|
||||
gesperrt ist, erscheint als Hinweis an seiner Stelle, die übrige Anleitung bleibt lesbar.
|
||||
--}}
|
||||
@section('content')
|
||||
<p class="mb-crumb"><a href="{{ route('member.library') }}"><x-heroicon-o-arrow-left aria-hidden="true" /> Zur Bibliothek</a></p>
|
||||
<article class="mb-reading mb-exercise">
|
||||
<header class="mb-content-head">
|
||||
<h1 class="mb-title">{{ $guide['title'] }}</h1>
|
||||
@if (filled($guide['summary']))
|
||||
<p class="mb-lead">{{ $guide['summary'] }}</p>
|
||||
@endif
|
||||
</header>
|
||||
|
||||
@if (filled($copy ?? null))
|
||||
<p class="state state-hinweis">Lizenziert für {{ $reader }} · Lizenzkopie {{ $copy }}</p>
|
||||
@endif
|
||||
|
||||
<dl class="mb-facts">
|
||||
@if (filled($guide['learning_goal']))
|
||||
<div><dt>Lernziel</dt><dd>{{ $guide['learning_goal'] }}</dd></div>
|
||||
@endif
|
||||
@if ($guide['duration_minutes'] !== null)
|
||||
<div><dt>Dauer</dt><dd>{{ $guide['duration_minutes'] }}@if ($guide['duration_max'] !== null) bis {{ $guide['duration_max'] }}@endif Minuten</dd></div>
|
||||
@endif
|
||||
@if (filled($guide['prerequisites']))
|
||||
<div><dt>Voraussetzungen</dt><dd>{{ $guide['prerequisites'] }}</dd></div>
|
||||
@endif
|
||||
@if (filled($guide['material_note']))
|
||||
<div><dt>Ausstattung</dt><dd>{{ $guide['material_note'] }}</dd></div>
|
||||
@endif
|
||||
</dl>
|
||||
|
||||
@if (count($guide['variants']) > 1)
|
||||
<nav class="mb-variants" aria-label="Varianten">
|
||||
<ul>
|
||||
@foreach ($guide['variants'] as $variant)
|
||||
<li>
|
||||
<a href="{{ $variantUrl($variant['key']) }}" @if ($guide['chosen'] === $variant['key']) aria-current="true" @endif>{{ $variant['name'] }}</a>
|
||||
@unless ($variant['complete'])
|
||||
<span class="state state-hinweis">derzeit nicht vollständig durchführbar</span>
|
||||
@endunless
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
|
||||
@foreach ($guide['variants'] as $variant)
|
||||
@if ($guide['chosen'] === $variant['key'])
|
||||
@if (filled($variant['description']))
|
||||
<p class="mb-prose">{{ $variant['description'] }}</p>
|
||||
@endif
|
||||
@unless ($variant['complete'])
|
||||
<p class="state state-hinweis" role="status">
|
||||
Diese Variante ist derzeit nicht vollständig durchführbar: {{ implode(', ', $variant['missing']) }} ist nicht verfügbar.
|
||||
@if (count($guide['variants']) > 1) Eine andere Variante steht weiter zur Verfügung. @endif
|
||||
</p>
|
||||
@endunless
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@foreach ($guide['entries'] as $entry)
|
||||
<section class="mb-exercise-part" data-class="{{ $entry['class'] }}" data-state="{{ $entry['state'] }}">
|
||||
@if ($entry['allowed'] && $entry['class'] === 'text')
|
||||
<h2>{{ $entry['title'] }}</h2>
|
||||
<div class="mb-prose">
|
||||
@include('member.partials.guide-blocks', ['blocks' => $entry['blocks']])
|
||||
</div>
|
||||
@elseif ($entry['allowed'])
|
||||
<h2>{{ $entry['title'] }}</h2>
|
||||
<p>
|
||||
<a class="button button-secondary" href="{{ $entry['url'] }}">
|
||||
{{ in_array($entry['class'], ['film', 'audio'], true) ? 'Ansehen' : 'Öffnen' }}
|
||||
</a>
|
||||
@if ($entry['download_url'])
|
||||
<a class="button button-secondary" href="{{ $entry['download_url'] }}">Herunterladen</a>
|
||||
@endif
|
||||
</p>
|
||||
@elseif ($entry['requirement'] === 'ergaenzend')
|
||||
<p class="state state-hinweis" role="note">
|
||||
{{ $entry['title'] }}: Dieses ergänzende Material ist derzeit nicht verfügbar. Die Übung bleibt vollständig durchführbar.
|
||||
</p>
|
||||
@else
|
||||
<p class="state state-hinweis" role="note">
|
||||
{{ $entry['title'] }}: Dieser Bestandteil ist derzeit nicht verfügbar.
|
||||
</p>
|
||||
@endif
|
||||
</section>
|
||||
@endforeach
|
||||
|
||||
<p class="mb-actions">
|
||||
@if ($pdfUrl)
|
||||
<a class="button button-secondary" href="{{ $pdfUrl }}"><x-heroicon-o-arrow-down-tray aria-hidden="true" /> Als PDF herunterladen</a>
|
||||
@else
|
||||
<span class="state state-hinweis">Ein PDF ist für diese Lizenz oder derzeit nicht verfügbar.</span>
|
||||
@endif
|
||||
</p>
|
||||
</article>
|
||||
@endsection
|
||||
@@ -0,0 +1,23 @@
|
||||
@foreach ($blocks as $block)
|
||||
@switch ($block['type'])
|
||||
@case ('heading')
|
||||
<h3>{{ $block['text'] }}</h3>
|
||||
@break
|
||||
@case ('bullets')
|
||||
<ul>
|
||||
@foreach ($block['items'] as $item)
|
||||
<li>{{ $item }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@break
|
||||
@case ('numbered')
|
||||
<ol>
|
||||
@foreach ($block['items'] as $item)
|
||||
<li>{{ $item }}</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
@break
|
||||
@default
|
||||
<p>{{ $block['text'] }}</p>
|
||||
@endswitch
|
||||
@endforeach
|
||||
Reference in new issue
Block a user