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