Erlaube in Kopf und Fuß einer PDF-Vorlage ein Logo links oder rechts
Deploy Test / test (push) Successful in 3m8s
Deploy Test / deploy (push) Successful in 26s

Kopf und Fuß haben je eine Anordnung: Band in voller Seitenbreite (Vorgabe, wie
bisher), Logo links oder Logo rechts am Textrand. Die Logohöhe ist einstellbar
(16 bis 100 Punkt, Vorgabe 40); das Logo ist höchstens halb so breit wie der Text,
der Text beginnt darunter beziehungsweise endet darüber. Die Titelseite bleibt
unberührt. Additive Migration mit Vorgaben; der vorherige Programmstand zeigt jede
Grafik weiter als Band.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-24 16:34:17 +01:00
1 parent b942b5331a
commit 9f9370dbf8
10 files changed
+301 -20

No files matched your search

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Kopf und Fuß einer PDF-Vorlage können statt eines Bands in voller Seitenbreite ein Logo links oder rechts tragen.
* Je Zeile steht dafür die Anordnung (`full`, `left`, `right`) und die Höhe des Logos in Punkt. Rein additiv; ohne die
* Spalten, also im vorherigen Programmstand, bleibt jede Grafik ein Band in voller Seitenbreite.
*/
return new class extends Migration
{
public function up(): void
{
Schema::table('pdf_templates', function (Blueprint $table) {
$table->string('header_align', 10)->default('full');
$table->string('footer_align', 10)->default('full');
$table->unsignedSmallInteger('header_logo_height')->default(40);
$table->unsignedSmallInteger('footer_logo_height')->default(40);
});
}
public function down(): void
{
Schema::table('pdf_templates', function (Blueprint $table) {
$table->dropColumn(['header_align', 'footer_align', 'header_logo_height', 'footer_logo_height']);
});
}
};