@@ -69,6 +69,12 @@ public static function form(Form $form): Form
6969 ->helperText (flexiblePagesTrans ('menus.form.code_help ' )),
7070 ];
7171
72+ $ formFields [] = Textarea::make ('description ' )
73+ ->label (flexiblePagesTrans ('menus.form.description_lbl ' ))
74+ ->rows (3 )
75+ ->helperText (flexiblePagesTrans ('menus.form.description_help ' ))
76+ ->columnSpan (2 );
77+
7278 // Only show style field if there are multiple styles available
7379 if ($ showStyleField ) {
7480 $ formFields [] = Select::make ('style ' )
@@ -87,16 +93,11 @@ public static function form(Form $form): Form
8793 ->placeholder (FilamentFlexibleContentBlockPages::config ()->getMenuMaxDepth ())
8894 ->helperText (flexiblePagesTrans ('menus.form.max_depth_help ' ));
8995
90- $ formFields [] = Textarea::make ('description ' )
91- ->label (flexiblePagesTrans ('menus.form.description_lbl ' ))
92- ->rows (3 )
93- ->helperText (flexiblePagesTrans ('menus.form.description_help ' ));
94-
9596 return $ form
9697 ->schema ([
9798 Section::make (flexiblePagesTrans ('menus.form.general_section ' ))
9899 ->schema ($ formFields )
99- ->columns (1 ),
100+ ->columns (2 ),
100101 ]);
101102 }
102103
@@ -123,24 +124,6 @@ public static function table(Table $table): Table
123124 ->badge ()
124125 ->color ('gray ' )
125126 ->visible (fn () => count (FilamentFlexibleContentBlockPages::config ()->getMenuStyles ()) > 1 ),
126-
127- TextColumn::make ('max_depth ' )
128- ->label (flexiblePagesTrans ('menus.table.max_depth_col ' ))
129- ->formatStateUsing (function (?int $ state ): string {
130- return $ state ? (string ) $ state : flexiblePagesTrans ('menus.table.default_depth ' );
131- })
132- ->sortable (),
133-
134- TextColumn::make ('menuItems_count ' )
135- ->label (flexiblePagesTrans ('menus.table.items_count_col ' ))
136- ->counts ('menuItems ' )
137- ->sortable (),
138-
139- TextColumn::make ('created_at ' )
140- ->label (flexiblePagesTrans ('menus.table.created_at_col ' ))
141- ->dateTime ()
142- ->sortable ()
143- ->toggleable (isToggledHiddenByDefault: true ),
144127 ])
145128 ->filters ([
146129 //
@@ -149,7 +132,7 @@ public static function table(Table $table): Table
149132 Action::make ('manage_items ' )
150133 ->label (flexiblePagesTrans ('menus.actions.manage_items ' ))
151134 ->icon ('heroicon-o-bars-3 ' )
152- ->color ('primary ' )
135+ ->color ('secondary ' )
153136 ->url (fn ($ record ) => static ::getUrl ('items ' , ['record ' => $ record ])),
154137 EditAction::make (),
155138 ])
0 commit comments