Gestalte den Mitgliederbereich fuer den Kursraum
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
abcdc6908e
commit
1d8315c9a4
21 files changed
+1064
-169
No files matched your search
@@ -1,48 +1,111 @@
|
||||
@extends('layouts.site')
|
||||
@extends('layouts.member')
|
||||
|
||||
@section('title', 'Bibliothek')
|
||||
@section('title', match ($sicht) {
|
||||
'programme' => 'Programme',
|
||||
'module' => 'Module',
|
||||
default => '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>
|
||||
<header class="member-intro">
|
||||
<p class="flag">Für die Kursstunde</p>
|
||||
<h1>{{ match ($sicht) {
|
||||
'programme' => 'Programme',
|
||||
'module' => 'Module',
|
||||
default => 'Bibliothek',
|
||||
} }}</h1>
|
||||
<p class="lede">Suchen Sie ein Programm, ein Modul oder ein einzelnes Material und öffnen Sie, was Ihre Lizenz enthält.</p>
|
||||
</header>
|
||||
|
||||
<form class="finder" method="get" action="{{ $sicht === 'programme' ? route('member.programs') : ($sicht === 'module' ? route('member.modules') : route('member.library')) }}">
|
||||
<label class="finder-query" for="q">Suche</label>
|
||||
<input id="q" name="q" type="search" value="{{ $query ?? '' }}" placeholder="Titel oder Kurzbeschreibung">
|
||||
@if ($filterDimensions->isNotEmpty())
|
||||
@foreach ($filterDimensions as $dimension)
|
||||
<fieldset>
|
||||
<legend>{{ $dimension->label }}</legend>
|
||||
@foreach ($dimension->values as $value)
|
||||
<label class="check">
|
||||
<input type="checkbox" name="dimension[]" value="{{ $value->id }}" @checked(in_array($value->id, $dimensionIds, true))>
|
||||
<span>{{ $value->label }}</span>
|
||||
</label>
|
||||
@endforeach
|
||||
</fieldset>
|
||||
@endforeach
|
||||
@endif
|
||||
<fieldset>
|
||||
<legend>Verfügbarkeit</legend>
|
||||
<label class="check"><input type="radio" name="nutzung" value="" @checked(($nutzung ?? '') === '')> <span>Alle</span></label>
|
||||
<label class="check"><input type="radio" name="nutzung" value="nutzbar" @checked(($nutzung ?? '') === 'nutzbar')> <span>Nutzbar</span></label>
|
||||
<label class="check"><input type="radio" name="nutzung" value="teilweise" @checked(($nutzung ?? '') === 'teilweise')> <span>Teilweise nutzbar</span></label>
|
||||
</fieldset>
|
||||
<div class="finder-actions">
|
||||
<button class="button" type="submit">Filter anwenden</button>
|
||||
<a class="button button-quiet" href="{{ $sicht === 'programme' ? route('member.programs') : ($sicht === 'module' ? route('member.modules') : route('member.library')) }}">Zurücksetzen</a>
|
||||
</div>
|
||||
</form>
|
||||
<p class="lede">Programme zeigen den Aufbau. Einzelne Materialien stehen darunter, solange sie zu keinem freigegebenen Programm gehören.</p>
|
||||
@if ($programs === [] && $materials === [])
|
||||
|
||||
@php
|
||||
$showPrograms = $sicht !== 'module';
|
||||
$showModules = $sicht !== 'programme';
|
||||
$showMaterials = $sicht === null;
|
||||
$visible = ($showPrograms ? count($programs) : 0) + ($showModules ? count($modules) : 0) + ($showMaterials ? count($materials) : 0);
|
||||
@endphp
|
||||
|
||||
@if ($visible === 0)
|
||||
<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>
|
||||
@if ($libraryEmpty && ($query ?? '') === '' && ($nutzung ?? '') === '' && $dimensionIds === [])
|
||||
<h2>Noch nichts in der Bibliothek</h2>
|
||||
<p>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>
|
||||
@else
|
||||
<h2>Keine Treffer</h2>
|
||||
<p>Für diese Suche oder Filterkombination liegt nichts in Ihrer Bibliothek. Setzen Sie die Filter zurück oder sehen Sie die Angebote an.</p>
|
||||
<p><a class="button" href="{{ route('member.offers') }}">Zu den Angeboten</a></p>
|
||||
@endif
|
||||
</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>
|
||||
@if ($showPrograms && $programs !== [])
|
||||
<section>
|
||||
<h2>Programme</h2>
|
||||
<div class="card-grid">
|
||||
@foreach ($programs as $program)
|
||||
@include('member.partials.card', [
|
||||
'href' => route('member.program', $program['composition']),
|
||||
'card' => $program + [
|
||||
'error' => $program['composition']->thumbnail_error,
|
||||
'image' => filled($program['composition']->thumbnail_path) ? ($program['composition']->thumbnail_alt ?: 'Vorschaubild') : null,
|
||||
],
|
||||
])
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
@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>
|
||||
@if ($showModules && $modules !== [])
|
||||
<section>
|
||||
<h2>Module</h2>
|
||||
<div class="card-grid">
|
||||
@foreach ($modules as $module)
|
||||
@include('member.partials.card', [
|
||||
'href' => route('member.program', $module['composition']),
|
||||
'card' => $module + ['error' => $module['composition']->thumbnail_error],
|
||||
])
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
@if ($showMaterials && $materials !== [])
|
||||
<section>
|
||||
<h2>Materialien</h2>
|
||||
<div class="card-grid">
|
||||
@foreach ($materials as $material)
|
||||
@include('member.partials.card', [
|
||||
'href' => route('member.article', $material['article']),
|
||||
'card' => $material,
|
||||
])
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
@endif
|
||||
@endsection
|
||||
Reference in new issue
Block a user