Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion resources/views/timeline.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<div class="flex flex-col gap-6">
@if ($entries->isEmpty())
<p class="text-sm text-gray-500 dark:text-gray-400">{{ $emptyState }}</p>
<div class="flex flex-col items-center justify-center gap-3 py-10 text-center">
<div class="flex h-11 w-11 items-center justify-center rounded-full bg-gray-100 text-gray-400 dark:bg-white/5 dark:text-gray-500">
<x-filament::icon icon="ri-history-line" class="h-5 w-5" />
</div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">{{ $emptyState }}</p>
</div>
@elseif ($grouped !== null)
@foreach ($grouped as $label => $groupEntries)
<section x-data="{ open: true }" wire:key="timeline-group-{{ $label }}">
Expand Down
3 changes: 3 additions & 0 deletions src/Filament/RelationManagers/ActivityLogRelationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public static function getTitle(Model $ownerRecord, string $pageClass): string

public static int $perPage = 20;

public static ?string $emptyState = null;

public function content(Schema $schema): Schema
{
$owner = $this->getOwnerRecord();
Expand All @@ -44,6 +46,7 @@ public function content(Schema $schema): Schema
'groupByDate' => self::$groupByDate,
'perPage' => self::$perPage,
'infiniteScroll' => self::$infiniteScroll,
'emptyState' => static::$emptyState ?? (string) __('activity-log::messages.empty_state'),
])->key('activity-log-relation-manager-'.$owner->getKey()),
]),
]);
Expand Down
Loading