This commit is contained in:
salam committed 2025-11-05 14:07:28 +01:00
1 parent 1fbd9da376
commit 3791379c41
16 files changed
+108 -86

No files matched your search

@@ -24,7 +24,7 @@ class CreateProjektInhaltsverzeichnis
$inhalt->ordnungszahl = $value->ordnungszahl;
$inhalt->name = $value->name;
$inhalt->name2 = $value->name2;
$inhalt->ueberschrift_anzeigen = $value->ueberschrift_anzeigen;
$inhalt->ueberschrift_verbergen = $value->ueberschrift_verbergen;
$inhalt->inhaltselement_id = $value->inhaltselement_id;
$inhalt->part = $value->part;
$inhalt->seite = $value->seite;
+1 -1
View File
@@ -13,7 +13,7 @@ class Inhalt
$html = '<table class="inhalt">';
$inhalte = ProjektInhaltsverzeichnis::where('projekte_id', $projekte_id)->orderBy('sort')->get();
foreach ($inhalte as $inhalt) {
if ($inhalt->name != 'INHALTSVERZEICHNIS' && $inhalt->ueberschrift_anzeigen) {
if ($inhalt->name != 'INHALTSVERZEICHNIS' && $inhalt->ueberschrift_verbergen) {
$html .= '<tr>';
$html .= Html::td(Format::index($inhalt->ordnungszahl), 'center');
$html .= Html::td($inhalt->name);
+1 -1
View File
@@ -8,7 +8,7 @@ class Ueberschrift
{
public static function load($inhalt)
{
if ($inhalt->ueberschrift_anzeigen && $inhalt->inhaltselement_id != 9) {
if ($inhalt->ueberschrift_verbergen && $inhalt->inhaltselement_id != 9) {
if ($inhalt->ordnungszahl * 1 > 0) {
return '<div class="header">'.Format::index($inhalt->ordnungszahl).' '.$inhalt->name.'</div>';
} else {
@@ -5,9 +5,11 @@ namespace App\Filament\Resources\Inhaltsverzeichnis\Schemas;
use App\Models\Inhaltselement;
use App\Models\Textblock;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Schema;
@@ -24,12 +26,30 @@ class InhaltsverzeichnisForm
->schema([
Checkbox::make('neue_seite')
->label('Start neuer Seite'),
Checkbox::make('ueberschrift_anzeigen')
->label('Überschrift angezeigen'),
Checkbox::make('ueberschrift_verbergen')
->label('Überschrift verbergen'),
Textarea::make('name')
->required()
->label('Überschrift')
->columnSpan(3),
Section::make('Hilfe')
->icon('phosphor-question')
->schema([
FileUpload::make('hilfe_bild')
->image()
->label('Bild')
->disk('public')
->maxSize(3072) // 3MB limit
->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp'])
->directory('gutachten_hilfe')
->visibility('public')
->columnSpanFull(),
Textarea::make('hilfe_text')
->label('Text')
->columnSpan(2),
])
->collapsible()
->columnSpan(3),
]),
Tab::make('Kapitel Index')
->schema([
@@ -53,8 +53,8 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
->schema([
Checkbox::make('neue_seite')
->label('Start neuer Seite'),
// Checkbox::make('ueberschrift_anzeigen')
// ->label('Überschrift angezeigen'),
// Checkbox::make('ueberschrift_verbergen')
// ->label('Überschrift verbergen'),
Textarea::make('name')
->required()
->label('Überschrift')
+1 -1
View File
@@ -8,7 +8,7 @@ class Inhaltsverzeichnis extends Model
{
protected $fillable = [
'name',
'ueberschrift_anzeigen',
'ueberschrift_verbergen',
'inhaltselement_id',
'textblock_id',
'sort',
+1 -1
View File
@@ -9,7 +9,7 @@ class ProjektInhaltsverzeichnis extends Model
protected $fillable = [
'projekte_id',
'name',
'ueberschrift_anzeigen',
'ueberschrift_verbergen',
'inhaltselement_id',
'sort',
'ordnungszahl',