41 lines
1.5 KiB
PHP
41 lines
1.5 KiB
PHP
@extends('layouts.member')
|
|
|
|
@section('title', 'Materialien')
|
|
|
|
@section('content')
|
|
@inject('courses', App\Http\CourseOutline::class)
|
|
<header class="member-intro">
|
|
<p class="flag">Materialien</p>
|
|
<h1>Filme und Materialien</h1>
|
|
<p class="lede">Filme und Hörstücke, die Ihre Lizenz zum Abspielen freigibt.</p>
|
|
</header>
|
|
@php
|
|
$films = $grants->filter(function ($grant) {
|
|
return $grant->article->currentRelease?->contents->contains(
|
|
fn ($content) => in_array($content->elementVersion->element->output_class, ['film', 'audio'], true),
|
|
);
|
|
});
|
|
@endphp
|
|
@if ($films->isEmpty())
|
|
<div class="empty">
|
|
<h2>Kein Film in dieser Lizenz</h2>
|
|
<p>Unter Ihren Berechtigungen ist gerade kein Film oder Hörstück.</p>
|
|
<p><a class="button" href="{{ route('member.library') }}">Zur Bibliothek</a></p>
|
|
</div>
|
|
@else
|
|
<div class="card-grid">
|
|
@foreach ($films as $grant)
|
|
@include('member.partials.card', [
|
|
'href' => route('member.article', $grant->article),
|
|
'card' => [
|
|
'title' => $courses->title($grant->article),
|
|
'kind' => $courses->kindLabel($grant->article),
|
|
'summary' => null,
|
|
'coverage' => 'nutzbar',
|
|
],
|
|
])
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
@endsection
|