mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 12:16:07 +00:00
Enhanced how activities are shown on items in recycle bin
This commit is contained in:
parent
ec3aeb3315
commit
df10b508d8
@ -3,6 +3,7 @@
|
|||||||
use BookStack\Auth\Permissions\PermissionService;
|
use BookStack\Auth\Permissions\PermissionService;
|
||||||
use BookStack\Auth\User;
|
use BookStack\Auth\User;
|
||||||
use BookStack\Entities\Entity;
|
use BookStack\Entities\Entity;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
@ -104,7 +105,9 @@ class ActivityService
|
|||||||
$activity = $this->permissionService
|
$activity = $this->permissionService
|
||||||
->filterRestrictedEntityRelations($query, 'activities', 'entity_id', 'entity_type')
|
->filterRestrictedEntityRelations($query, 'activities', 'entity_id', 'entity_type')
|
||||||
->orderBy('created_at', 'desc')
|
->orderBy('created_at', 'desc')
|
||||||
->with(['entity', 'user.avatar'])
|
->with(['entity' => function (Relation $query) {
|
||||||
|
$query->withTrashed();
|
||||||
|
}, 'user.avatar'])
|
||||||
->skip($count * ($page - 1))
|
->skip($count * ($page - 1))
|
||||||
->take($count)
|
->take($count)
|
||||||
->get();
|
->get();
|
||||||
|
@ -16,10 +16,14 @@
|
|||||||
|
|
||||||
{{ $activity->getText() }}
|
{{ $activity->getText() }}
|
||||||
|
|
||||||
@if($activity->entity)
|
@if($activity->entity && is_null($activity->entity->deleted_at))
|
||||||
<a href="{{ $activity->entity->getUrl() }}">{{ $activity->entity->name }}</a>
|
<a href="{{ $activity->entity->getUrl() }}">{{ $activity->entity->name }}</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if($activity->entity && !is_null($activity->entity->deleted_at))
|
||||||
|
"{{ $activity->entity->name }}"
|
||||||
|
@endif
|
||||||
|
|
||||||
@if($activity->extra) "{{ $activity->extra }}" @endif
|
@if($activity->extra) "{{ $activity->extra }}" @endif
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
Reference in New Issue
Block a user