Biete Tabellen und Bilder im gemeinsamen Texteditor an und setze sie in Ansicht und PDF
Tabellen und Bilder gehören zur festen Auswahl von FormattedText. Ein Bild ist ein Verweis auf eine freigegebene Bildfassung und kommt per Picker aus dem Medienbestand; der Stand schreibt die Bildfassung mit fest, die Rechte entscheidet DecideAccess. Der PDF-Satz (PdfFlow) ist für Übung und kommende Dokumente gemeinsam; PdfDocument kann zusätzlich Bilder, Flächen, Verweise und Lesezeichen, Belege bleiben byte-gleich. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
219962daff
commit
c57a506f85
27 files changed
+1729
-219
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Domain\Catalog\ArticleRelease;
|
||||
use App\Domain\Catalog\CompositionVersion;
|
||||
use App\Domain\Catalog\EmbeddedImages;
|
||||
use App\Domain\Catalog\ExerciseGuide;
|
||||
use App\Domain\Catalog\ExercisePdf;
|
||||
use App\Domain\Catalog\LicenseArticle;
|
||||
@@ -76,6 +77,7 @@ public function pdf(Request $request, LicenseArticle $article, ArticleRelease $r
|
||||
|
||||
$copy = DeliveryLog::newCopyId();
|
||||
$variant = collect($guide['variants'])->firstWhere('key', $guide['chosen']);
|
||||
$images = app(EmbeddedImages::class)->forPdf($request->user(), $article, $release);
|
||||
$content = $pdf->render(
|
||||
$guide,
|
||||
$sections,
|
||||
@@ -83,6 +85,7 @@ public function pdf(Request $request, LicenseArticle $article, ArticleRelease $r
|
||||
$copy,
|
||||
(string) ($variant['name'] ?? ''),
|
||||
route('member.exercise', ['article' => $article, 'release' => $release, 'path' => $path, 'variante' => $guide['chosen']]),
|
||||
$images,
|
||||
);
|
||||
$checksum = hash('sha256', $content);
|
||||
|
||||
@@ -94,6 +97,11 @@ public function pdf(Request $request, LicenseArticle $article, ArticleRelease $r
|
||||
}
|
||||
}
|
||||
|
||||
// Bilder im Text sind eigene Fassungen: Auch sie stehen im Ausgabenachweis dieses PDF.
|
||||
foreach ($images->used() as $image) {
|
||||
app(DeliveryLog::class)->write($image['grant'], $article, $release, $image['version'], 'laden', 'pdf', $checksum, 'k2', $copy, $located['version']->id);
|
||||
}
|
||||
|
||||
$name = str($guide['title'])->slug()->value() ?: 'uebung';
|
||||
|
||||
return response($content, 200, [
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
use App\Domain\Catalog\ContentElementVersion;
|
||||
use App\Domain\Catalog\ContentVersionStatus;
|
||||
use App\Domain\Catalog\EditorialVocabulary;
|
||||
use App\Domain\Catalog\EmbeddedImages;
|
||||
use App\Domain\Catalog\IdentityDimension;
|
||||
use App\Domain\Catalog\LicenseArticle;
|
||||
use App\Domain\Catalog\Pillar;
|
||||
@@ -278,6 +279,7 @@ public function show(Request $request, LicenseArticle $article): View
|
||||
'entries' => $entries,
|
||||
'title' => app(CourseOutline::class)->title($article),
|
||||
'kind' => app(CourseOutline::class)->kindLabel($article),
|
||||
'images' => $release === null ? null : app(EmbeddedImages::class)->forView($request->user(), $article, $release),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -319,6 +321,7 @@ public function media(
|
||||
'article' => $article,
|
||||
'version' => $version,
|
||||
'license' => $decision->grant->rights_snapshot['purpose'] ?? null,
|
||||
'images' => app(EmbeddedImages::class)->forView($request->user(), $article, $release),
|
||||
'reader' => $request->user()->name,
|
||||
'copy' => $delivery->copy_id,
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user