From 65b77defdc876dad89db7eea87aaf0c4dbcec383 Mon Sep 17 00:00:00 2001 From: Dennis Koch Date: Mon, 16 Oct 2023 17:16:23 +0200 Subject: [PATCH 1/2] add `getBreadcrumb()` method This should fix issue #23 which is a collision with Filament Spotligh --- resources/lang/ar/activities.php | 2 ++ resources/lang/de/activities.php | 2 ++ resources/lang/en/activities.php | 2 ++ src/Pages/ListActivities.php | 5 +++++ 4 files changed, 11 insertions(+) diff --git a/resources/lang/ar/activities.php b/resources/lang/ar/activities.php index de810bd..2132842 100644 --- a/resources/lang/ar/activities.php +++ b/resources/lang/ar/activities.php @@ -1,6 +1,8 @@ 'سجل عمليات', + 'title' => 'سجل عمليات :record', 'default_datetime_format' => 'Y-m-d, H:i:s', diff --git a/resources/lang/de/activities.php b/resources/lang/de/activities.php index ac7edf0..49873ce 100644 --- a/resources/lang/de/activities.php +++ b/resources/lang/de/activities.php @@ -1,6 +1,8 @@ 'Historie', + 'title' => 'Historie :record', 'default_datetime_format' => 'd.m.Y, H:i:s \U\h\r', diff --git a/resources/lang/en/activities.php b/resources/lang/en/activities.php index 20356f7..b2667b6 100644 --- a/resources/lang/en/activities.php +++ b/resources/lang/en/activities.php @@ -1,6 +1,8 @@ 'History', + 'title' => 'History :record', 'default_datetime_format' => 'Y-m-d, H:i:s', diff --git a/src/Pages/ListActivities.php b/src/Pages/ListActivities.php index 145d114..f4e19ce 100644 --- a/src/Pages/ListActivities.php +++ b/src/Pages/ListActivities.php @@ -31,6 +31,11 @@ public function mount($record) $this->record = $this->resolveRecord($record); } + public function getBreadcrumb(): string + { + return static::$breadcrumb ?? __('filament-activity-log::activities.breadcrumb'); + } + public function getTitle(): string { return __('filament-activity-log::activities.title', ['record' => $this->getRecordTitle()]); From 26a57773c74475dc7b9d4e2f6c8b5ed55f0710fd Mon Sep 17 00:00:00 2001 From: pxlrbt Date: Mon, 16 Oct 2023 15:17:16 +0000 Subject: [PATCH 2/2] Apply style changes --- src/Pages/ListActivities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/ListActivities.php b/src/Pages/ListActivities.php index f4e19ce..f5cc0c8 100644 --- a/src/Pages/ListActivities.php +++ b/src/Pages/ListActivities.php @@ -19,8 +19,8 @@ abstract class ListActivities extends Page implements HasForms { use CanPaginateRecords; use HandlesPagination; - use InteractsWithRecord; use InteractsWithFormActions; + use InteractsWithRecord; protected static string $view = 'filament-activity-log::pages.list-activities';