|
16 | 16 | use Illuminate\Support\Str;
|
17 | 17 | use Statikbe\FilamentFlexibleContentBlockPages\Actions\LinkedToMenuItemBulkDeleteAction;
|
18 | 18 | use Statikbe\FilamentFlexibleContentBlockPages\Facades\FilamentFlexibleContentBlockPages;
|
| 19 | +use Statikbe\FilamentFlexibleContentBlockPages\Models\Page; |
19 | 20 | use Statikbe\FilamentFlexibleContentBlockPages\Resources\PageResource\Pages\CreatePage;
|
20 | 21 | use Statikbe\FilamentFlexibleContentBlockPages\Resources\PageResource\Pages\EditPage;
|
21 | 22 | use Statikbe\FilamentFlexibleContentBlockPages\Resources\PageResource\Pages\ListPages;
|
@@ -195,7 +196,13 @@ public static function table(Table $table): Table
|
195 | 196 | TextColumn::make('created_at')
|
196 | 197 | ->label(flexiblePagesTrans('pages.table.created_at_col'))
|
197 | 198 | ->dateTime(FilamentFlexibleBlocksConfig::getPublishingDateFormatting())
|
198 |
| - ->sortable(), |
| 199 | + ->sortable() |
| 200 | + ->toggleable(isToggledHiddenByDefault: true), |
| 201 | + TextColumn::make('updated_at') |
| 202 | + ->label(flexiblePagesTrans('pages.table.updated_at_col')) |
| 203 | + ->dateTime(FilamentFlexibleBlocksConfig::getPublishingDateFormatting()) |
| 204 | + ->sortable() |
| 205 | + ->toggleable(isToggledHiddenByDefault: true), |
199 | 206 | PublishedColumn::create()
|
200 | 207 | ->sortable(),
|
201 | 208 | ])
|
@@ -255,16 +262,15 @@ public static function getGlobalSearchResultTitle(Model $record): string
|
255 | 262 |
|
256 | 263 | public static function getGlobalSearchResultDetails(Model $record): array
|
257 | 264 | {
|
258 |
| - $published = trans('filament-flexible-content-blocks::filament-flexible-content-blocks.columns.is_published_state_unpublished'); |
| 265 | + /** @var Page $record */ |
| 266 | + $published = flexiblePagesTrans('columns.is_published_state_unpublished'); |
259 | 267 | if ($record->isPublished()) {
|
260 |
| - $published = trans( |
261 |
| - 'filament-flexible-content-blocks::filament-flexible-content-blocks.columns.is_published_state_published' |
262 |
| - ); |
| 268 | + $published = flexiblePagesTrans('columns.is_published_state_published'); |
263 | 269 | }
|
264 | 270 |
|
265 | 271 | return [
|
266 |
| - trans('filament-flexible-content-blocks::filament-flexible-content-blocks.form_component.intro_lbl') => Str::limit(strip_tags($record->intro)), |
267 |
| - trans('filament-flexible-content-blocks::filament-flexible-content-blocks.columns.is_published') => $published, |
| 272 | + flexiblePagesTrans('form_component.intro_lbl') => Str::limit(strip_tags($record->intro)), |
| 273 | + flexiblePagesTrans('columns.is_published') => $published, |
268 | 274 | ];
|
269 | 275 | }
|
270 | 276 | }
|
0 commit comments