Inhaltsverwaltung: Bilder, Webseiten-Texte, Ausstattung, FAQ, Hinweis-Banner
- Bilder mit automatischen WebP-Webgrößen (640/1280/2048 px), Sortierung per Drag & Drop, Mehrfach-Upload, Import-Befehl photos:import - Webseiten-Texte als feste, bearbeitbare Bausteine (config/content.php), Rich-Text bereinigt ausgegeben - Ausstattung und FAQ aus der bisherigen Webseite übernommen - Rolle Inhalte hat Zugriff auf alle Webseiten-Bereiche Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
27ea12901e
commit
bb7eb62782
53 files changed
+1963
-1
No files matched your search
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photos\Tables;
|
||||
|
||||
use App\Enums\PhotoCategory;
|
||||
use App\Models\Photo;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\Layout\Stack;
|
||||
use Filament\Tables\Columns\SpatieMediaLibraryImageColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PhotosTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->reorderable('sort_order')
|
||||
->defaultSort('sort_order')
|
||||
->contentGrid(['md' => 3, 'xl' => 4])
|
||||
->paginated([24, 48, 'all'])
|
||||
->columns([
|
||||
Stack::make([
|
||||
SpatieMediaLibraryImageColumn::make('image')
|
||||
->collection(Photo::COLLECTION)
|
||||
->conversion('sm')
|
||||
->imageHeight(180)
|
||||
->extraImgAttributes(['class' => 'w-full object-cover rounded-lg']),
|
||||
TextColumn::make('alt_text')
|
||||
->weight('medium')
|
||||
->searchable(),
|
||||
TextColumn::make('category')
|
||||
->badge(),
|
||||
IconColumn::make('is_published')
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-eye')
|
||||
->falseIcon('heroicon-o-eye-slash'),
|
||||
])->space(2),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('category')
|
||||
->label('Kategorie')
|
||||
->options(PhotoCategory::class),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user