big change Inhaltstabelle und PDF

This commit is contained in:
salam committed 2025-11-03 18:14:46 +01:00
1 parent 2f6ae7e4a1
commit d5d1f743bb
58 files changed
+1244 -922

No files matched your search

@@ -3,7 +3,6 @@
namespace App\Filament\Resources\Textblocks\Schemas;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
@@ -15,11 +14,27 @@ class TextblockForm
->components([
TextInput::make('name')
->required(),
Textarea::make('beschreibung')
->afterLabel('Bei gleichen Textblockarten kann hier der Unterschied kurz angerissen werden.'),
RichEditor::make('textblock')
->extraInputAttributes(['style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;'])
->label('Abschnitt A')
->toolbarButtons([
['bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'horizontalRule', 'table'],
])->floatingToolbars([
'paragraph' => [
'bold', 'italic', 'underline', 'strike', 'subscript', 'superscript',
],
'heading' => [
'h1', 'h2', 'h3',
],
'table' => [
'tableAddColumnBefore', 'tableAddColumnAfter', 'tableDeleteColumn',
'tableAddRowBefore', 'tableAddRowAfter', 'tableDeleteRow',
'tableMergeCells', 'tableSplitCell',
'tableToggleHeaderRow',
'tableDelete',
],
]),
RichEditor::make('textblock2')
->label('Abschnitt B')
->toolbarButtons([
['bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'horizontalRule', 'table'],
])->floatingToolbars([
@@ -2,12 +2,13 @@
namespace App\Filament\Resources\Textblocks\Tables;
use App\Models\Textblock;
use Filament\Actions\DeleteAction;
use Filament\Actions\EditAction;
use Filament\Support\Enums\FontWeight;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Enums\FiltersLayout;
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Table;
use Illuminate\Support\HtmlString;
class TextblocksTable
{
@@ -17,13 +18,23 @@ class TextblocksTable
->defaultPaginationPageOption(5)
->columns([
TextColumn::make('name')
->weight(FontWeight::Bold)
->wrap()
->description(function ($record) {
return new HtmlString($record->textblock);
return view('pages.textblock')->with('record', $record);
})
->html(),
])
->deferFilters(false)
->filtersFormColumns(3)
->filters([
SelectFilter::make('id')
->label('Textblock')
->preload()
->default(1)
->options(function (): array {
return Textblock::pluck('name', 'id')->toArray();
}),
], layout: FiltersLayout::AboveContent)
->paginated(false)
->recordActions([
EditAction::make()->iconButton(),
DeleteAction::make()->iconButton(),