generated from filamentphp/plugin-skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from 199ocero/feat-adding-support-for-spatie-ac…
…tivity-log adding support for spatie activity log
- Loading branch information
Showing
9 changed files
with
405 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
resources/views/infolists/components/activity-description.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<p class="text-sm text-gray-600 dark:text-gray-400"> | ||
@if ($isHtmlAllowed()) | ||
{!! $getState() ?? $getPlaceholder() !!} | ||
{!! $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) !!} | ||
@else | ||
{{ $getState() ?? $getPlaceholder() }} | ||
{{ $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) }} | ||
@endif | ||
</p> |
6 changes: 3 additions & 3 deletions
6
resources/views/infolists/components/activity-title.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<h3 class="text-base font-semibold text-gray-800 dark:text-white"> | ||
<h3 class="text-base text-gray-800 dark:text-white"> | ||
@if ($isHtmlAllowed()) | ||
{!! $getState() ?? $getPlaceholder() !!} | ||
{!! $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) !!} | ||
@else | ||
{{ $getState() ?? $getPlaceholder() }} | ||
{{ $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) }} | ||
@endif | ||
</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<x-filament-panels::page> | ||
{{ $this->activityInfolist }} | ||
</x-filament-panels::page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace JaOcero\ActivityTimeline\Concerns; | ||
|
||
use Closure; | ||
use Illuminate\Support\HtmlString; | ||
|
||
trait CanModifyState | ||
{ | ||
protected $state; | ||
|
||
public function modifyState(Closure $callback): static | ||
{ | ||
$this->state = $callback; | ||
|
||
return $this; | ||
} | ||
|
||
public function getModifiedState(): ?HtmlString | ||
{ | ||
return $this->evaluate($this->state); | ||
} | ||
} |
Oops, something went wrong.