]> BookStack Code Mirror - bookstack/blob - resources/views/settings/recycle-bin/index.blade.php
Code cleanup, bug squashing
[bookstack] / resources / views / settings / recycle-bin / index.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                     <th></th>
48                 </tr>
49                 @if(count($deletions) === 0)
50                     <tr>
51                         <td colspan="4">
52                             <p class="text-muted"><em>{{ trans('settings.recycle_bin_contents_empty') }}</em></p>
53                         </td>
54                     </tr>
55                 @endif
56                 @foreach($deletions as $deletion)
57                 <tr>
58                     <td>
59                         <div class="table-entity-item">
60                             <span role="presentation" class="icon text-{{$deletion->deletable->getType()}}">@icon($deletion->deletable->getType())</span>
61                             <div class="text-{{ $deletion->deletable->getType() }}">
62                                 {{ $deletion->deletable->name }}
63                             </div>
64                         </div>
65                         @if($deletion->deletable instanceof \BookStack\Entities\Models\Book || $deletion->deletable instanceof \BookStack\Entities\Models\Chapter)
66                             <div class="mb-m"></div>
67                         @endif
68                         @if($deletion->deletable instanceof \BookStack\Entities\Models\Book)
69                             <div class="pl-xl block inline">
70                                 <div class="text-chapter">
71                                     @icon('chapter') {{ trans_choice('entities.x_chapters', $deletion->deletable->chapters()->withTrashed()->count()) }}
72                                 </div>
73                             </div>
74                         @endif
75                         @if($deletion->deletable instanceof \BookStack\Entities\Models\Book || $deletion->deletable instanceof \BookStack\Entities\Models\Chapter)
76                         <div class="pl-xl block inline">
77                             <div class="text-page">
78                                 @icon('page') {{ trans_choice('entities.x_pages', $deletion->deletable->pages()->withTrashed()->count()) }}
79                             </div>
80                         </div>
81                         @endif
82                     </td>
83                     <td>@include('partials.table-user', ['user' => $deletion->deleter, 'user_id' => $deletion->deleted_by])</td>
84                     <td width="200">{{ $deletion->created_at }}</td>
85                     <td width="150" class="text-right">
86                         <div component="dropdown" class="dropdown-container">
87                             <button type="button" refs="dropdown@toggle" class="button outline">{{ trans('common.actions') }}</button>
88                             <ul refs="dropdown@menu" class="dropdown-menu">
89                                 <li><a class="block" href="{{ url('/settings/recycle-bin/'.$deletion->id.'/restore') }}">{{ trans('settings.recycle_bin_restore') }}</a></li>
90                                 <li><a class="block" href="{{ url('/settings/recycle-bin/'.$deletion->id.'/destroy') }}">{{ trans('settings.recycle_bin_permanently_delete') }}</a></li>
91                             </ul>
92                         </div>
93                     </td>
94                 </tr>
95                 @endforeach
96             </table>
97
98             {!! $deletions->links() !!}
99
100         </div>
101
102     </div>
103 @stop