mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
3a402f6adc
On restore, added a link to the parent deletion restore if any exists on a cascading parent. Added a test to cover this case to ensure its shown. Also tweaked default empty state message on recycle bin item list to align with new column count. Also done a little existing code cleanup including a getUrl helper on the deletion items. Related to #2682 & #2594
40 lines
1.7 KiB
PHP
40 lines
1.7 KiB
PHP
@extends('simple-layout')
|
|
|
|
@section('body')
|
|
<div class="container small">
|
|
|
|
<div class="py-m">
|
|
@include('settings.navbar', ['selected' => 'maintenance'])
|
|
</div>
|
|
|
|
<div class="card content-wrap auto-height">
|
|
<h2 class="list-heading">{{ trans('settings.recycle_bin_restore') }}</h2>
|
|
<p class="text-muted">{{ trans('settings.recycle_bin_restore_confirm') }}</p>
|
|
<form action="{{ $deletion->getUrl('/restore') }}" method="post">
|
|
{!! csrf_field() !!}
|
|
<a href="{{ url('/settings/recycle-bin') }}" class="button outline">{{ trans('common.cancel') }}</a>
|
|
<button type="submit" class="button">{{ trans('settings.recycle_bin_restore') }}</button>
|
|
</form>
|
|
|
|
@if($deletion->deletable instanceof \BookStack\Entities\Models\Entity)
|
|
<hr class="mt-m">
|
|
<h5>{{ trans('settings.recycle_bin_restore_list') }}</h5>
|
|
<div class="flex-container-row mb-s items-center">
|
|
@if($deletion->deletable->getParent() && $deletion->deletable->getParent()->trashed())
|
|
<div class="text-neg flex">{{ trans('settings.recycle_bin_restore_deleted_parent') }}</div>
|
|
@endif
|
|
@if($parentDeletion)
|
|
<div class="flex fit-content ml-m">
|
|
<a class="button outline" href="{{ $parentDeletion->getUrl('/restore') }}">{{ trans('settings.recycle_bin_restore_parent') }}</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
@include('settings.recycle-bin.deletable-entity-list', ['entity' => $deletion->deletable])
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
@stop
|