1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added recycle bin auto-clear lifetime functionality

This commit is contained in:
Dan Brown
2020-11-07 13:58:23 +00:00
parent 68b1d87ebe
commit ec3aeb3315
10 changed files with 115 additions and 26 deletions

View File

@ -80,7 +80,7 @@ return [
'maint_send_test_email_mail_subject' => 'Test Email',
'maint_send_test_email_mail_greeting' => 'Email delivery seems to work!',
'maint_send_test_email_mail_text' => 'Congratulations! As you received this email notification, your email settings seem to be configured properly.',
'maint_recycle_bin_desc' => 'Items deleted remain in the recycle bin until it is emptied. Open the recycle bin to restore or permanently remove items.',
'maint_recycle_bin_desc' => 'Deleted shelves, books, chapters & pages are sent to the recycle bin so they can be restored or permanently deleted. Older items in the recycle bin may be automatically removed after a while depending on system configuration.',
'maint_recycle_bin_open' => 'Open Recycle Bin',
// Recycle Bin

View File

@ -5,6 +5,24 @@
@include('settings.navbar-with-version', ['selected' => 'maintenance'])
<div class="card content-wrap auto-height pb-xl">
<h2 class="list-heading">{{ trans('settings.recycle_bin') }}</h2>
<div class="grid half gap-xl">
<div>
<p class="small text-muted">{{ trans('settings.maint_recycle_bin_desc') }}</p>
</div>
<div>
<div class="grid half no-gap mb-m">
<p class="mb-xs text-bookshelf">@icon('bookshelf'){{ trans('entities.shelves') }}: {{ $recycleStats['bookshelf'] }}</p>
<p class="mb-xs text-book">@icon('book'){{ trans('entities.books') }}: {{ $recycleStats['book'] }}</p>
<p class="mb-xs text-chapter">@icon('chapter'){{ trans('entities.chapters') }}: {{ $recycleStats['chapter'] }}</p>
<p class="mb-xs text-page">@icon('page'){{ trans('entities.pages') }}: {{ $recycleStats['page'] }}</p>
</div>
<a href="{{ url('/settings/recycle-bin') }}" class="button outline">{{ trans('settings.maint_recycle_bin_open') }}</a>
</div>
</div>
</div>
<div id="image-cleanup" class="card content-wrap auto-height">
<h2 class="list-heading">{{ trans('settings.maint_image_cleanup') }}</h2>
<div class="grid half gap-xl">
@ -15,7 +33,7 @@
<form method="POST" action="{{ url('/settings/maintenance/cleanup-images') }}">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<div>
<div class="mb-s">
@if(session()->has('cleanup-images-warning'))
<p class="text-neg">
{{ session()->get('cleanup-images-warning') }}
@ -50,23 +68,5 @@
</div>
</div>
<div class="card content-wrap auto-height pb-xl">
<h2 class="list-heading">{{ trans('settings.recycle_bin') }}</h2>
<div class="grid half gap-xl">
<div>
<p class="small text-muted">{{ trans('settings.maint_recycle_bin_desc') }}</p>
<div class="grid half no-gap">
<p class="mb-xs text-bookshelf">@icon('bookshelf'){{ trans('entities.shelves') }}: {{ $recycleStats['bookshelf'] }}</p>
<p class="mb-xs text-book">@icon('book'){{ trans('entities.books') }}: {{ $recycleStats['book'] }}</p>
<p class="mb-xs text-chapter">@icon('chapter'){{ trans('entities.chapters') }}: {{ $recycleStats['chapter'] }}</p>
<p class="mb-xs text-page">@icon('page'){{ trans('entities.pages') }}: {{ $recycleStats['page'] }}</p>
</div>
</div>
<div>
<a href="{{ url('/settings/recycle-bin') }}" class="button outline">{{ trans('settings.maint_recycle_bin_open') }}</a>
</div>
</div>
</div>
</div>
@stop