]> BookStack Code Mirror - bookstack/blob - resources/views/settings/recycle-bin.blade.php
Added recycle bin empty notification response with count
[bookstack] / resources / views / settings / recycle-bin.blade.php
1 @extends('simple-layout')
2
3 @section('body')
4     <div class="container">
5
6         <div class="grid left-focus v-center no-row-gap">
7             <div class="py-m">
8                 @include('settings.navbar', ['selected' => 'maintenance'])
9             </div>
10         </div>
11
12         <div class="card content-wrap auto-height">
13             <h2 class="list-heading">{{ trans('settings.recycle_bin') }}</h2>
14
15             <div class="grid half left-focus">
16                 <div>
17                     <p class="text-muted">{{ trans('settings.recycle_bin_desc') }}</p>
18                 </div>
19                 <div class="text-right">
20                     <div component="dropdown" class="dropdown-container">
21                         <button refs="dropdown@toggle"
22                                 type="button"
23                                 class="button outline">{{ trans('settings.recycle_bin_empty') }} </button>
24                         <div refs="dropdown@menu" class="dropdown-menu">
25                             <p class="text-neg small px-m mb-xs">{{ trans('settings.recycle_bin_empty_confirm') }}</p>
26
27                             <form action="{{ url('/settings/recycle-bin/empty') }}" method="POST">
28                                 {!! csrf_field() !!}
29                                 <button type="submit" class="text-primary small delete">{{ trans('common.confirm') }}</button>
30                             </form>
31                         </div>
32                     </div>
33
34                 </div>
35             </div>
36
37
38             <hr class="mt-l mb-s">
39
40             {!! $deletions->links() !!}
41
42             <table class="table">
43                 <tr>
44                     <th>{{ trans('settings.recycle_bin_deleted_item') }}</th>
45                     <th>{{ trans('settings.recycle_bin_deleted_by') }}</th>
46                     <th>{{ trans('settings.recycle_bin_deleted_at') }}</th>
47                 </tr>
48                 @if(count($deletions) === 0)
49                     <tr>
50                         <td colspan="3">
51                             <p class="text-muted"><em>{{ trans('settings.recycle_bin_contents_empty') }}</em></p>
52                         </td>
53                     </tr>
54                 @endif
55                 @foreach($deletions as $deletion)
56                 <tr>
57                     <td>
58                         <div class="table-entity-item mb-m">
59                             <span role="presentation" class="icon text-{{$deletion->deletable->getType()}}">@icon($deletion->deletable->getType())</span>
60                             <div class="text-{{ $deletion->deletable->getType() }}">
61                                 {{ $deletion->deletable->name }}
62                             </div>
63                         </div>
64                         @if($deletion->deletable instanceof \BookStack\Entities\Book)
65                             <div class="pl-xl block inline">
66                                 <div class="text-chapter">
67                                     @icon('chapter') {{ trans_choice('entities.x_chapters', $deletion->deletable->chapters()->withTrashed()->count()) }}
68                                 </div>
69                             </div>
70                         @endif
71                         @if($deletion->deletable instanceof \BookStack\Entities\Book || $deletion->deletable instanceof \BookStack\Entities\Chapter)
72                         <div class="pl-xl block inline">
73                             <div class="text-page">
74                                 @icon('page') {{ trans_choice('entities.x_pages', $deletion->deletable->pages()->withTrashed()->count()) }}
75                             </div>
76                         </div>
77                         @endif
78                     </td>
79                     <td>@include('partials.table-user', ['user' => $deletion->deleter, 'user_id' => $deletion->deleted_by])</td>
80                     <td>{{ $deletion->created_at }}</td>
81                 </tr>
82                 @endforeach
83             </table>
84
85             {!! $deletions->links() !!}
86
87         </div>
88
89     </div>
90 @stop