textblöcke und Tabellen in der Inhaltsangabe

This commit is contained in:
salam committed 2025-10-31 11:17:15 +01:00
1 parent 5907e1129d
commit c64634b3a1
13 files changed
+242 -205

No files matched your search

@@ -26,13 +26,13 @@ class InhaltsverzeichnisForm
Textarea::make('name')
->required()
->label('Überschrift in der Inhaltsangabe')
->columnSpan(2),
->columnSpan(3),
Textarea::make('name2')
->label('Überschrift im Dokument')
->belowContent([
'Bei abweichender Überschrift im Dokument',
])
->columnSpan(2),
->columnSpan(3),
TextInput::make('ordnungszahl')
->label('Kapitel Index')
->placeholder('3.21')
@@ -50,10 +50,25 @@ class InhaltsverzeichnisForm
'Bei "0" wird die Seitenzahl automatisch generiert',
])
->columnSpan(1),
Checkbox::make('seitenzahl_anzeige')
->label('Seitenzahl angezeigen'),
])->columnSpanFull(),
Section::make('Tabellen & Textblöcke')
Section::make('Textblock und Tabelle')
->hiddenLabel()
->description('Ausgabe Textblock vor Tabelle')
->schema([
Select::make('textblock_id')->label('Textblock')
->prefixIcon('phosphor-article')
->prefixIconColor(
fn ($record): string => $record->textblock_id == 0 ? 'gray' : 'primary'
)
->default(0)
->options(function () {
$res = Textblock::all()->pluck('name', 'id')->toArray();
array_unshift($res, 'Ohne Textblock');
return $res;
}),
Select::make('tabellen_id')->label('Tabelle')
->prefixIcon('phosphor-table')
->prefixIconColor(
@@ -67,18 +82,6 @@ class InhaltsverzeichnisForm
return $res;
}),
Select::make('textblock_id')->label('Textblock')
->prefixIcon('phosphor-article')
->prefixIconColor(
fn ($record): string => $record->textblock_id == 0 ? 'gray' : 'primary'
)
->default(0)
->options(function () {
$res = Textblock::all()->pluck('name', 'id')->toArray();
array_unshift($res, 'Ohne Textblock');
return $res;
}),
])->columnSpanFull(),
]);
}