]> BookStack Code Mirror - bookstack/blob - resources/views/settings/recycle-bin/index.blade.php
Fixed failing webhook test cases
[bookstack] / resources / views / settings / recycle-bin / index.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4     <div class="container">
5
6         <div class="py-m">
7             @include('settings.parts.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="30%">{{ trans('settings.recycle_bin_deleted_item') }}</th>
43                     <th width="20%">{{ trans('settings.recycle_bin_deleted_parent') }}</th>
44                     <th width="20%">{{ trans('settings.recycle_bin_deleted_by') }}</th>
45                     <th width="15%">{{ trans('settings.recycle_bin_deleted_at') }}</th>
46                     <th width="15%"></th>
47                 </tr>
48                 @if(count($deletions) === 0)
49                     <tr>
50                         <td colspan="5">
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">
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\Models\Book || $deletion->deletable instanceof \BookStack\Entities\Models\Chapter)
65                             <div class="mb-m"></div>
66                         @endif
67                         @if($deletion->deletable instanceof \BookStack\Entities\Models\Book)
68                             <div class="pl-xl block inline">
69                                 <div class="text-chapter">
70                                     @icon('chapter') {{ trans_choice('entities.x_chapters', $deletion->deletable->chapters()->withTrashed()->count()) }}
71                                 </div>
72                             </div>
73                         @endif
74                         @if($deletion->deletable instanceof \BookStack\Entities\Models\Book || $deletion->deletable instanceof \BookStack\Entities\Models\Chapter)
75                         <div class="pl-xl block inline">
76                             <div class="text-page">
77                                 @icon('page') {{ trans_choice('entities.x_pages', $deletion->deletable->pages()->withTrashed()->count()) }}
78                             </div>
79                         </div>
80                         @endif
81                     </td>
82                     <td>
83                         @if($deletion->deletable->getParent())
84                         <div class="table-entity-item">
85                             <span role="presentation" class="icon text-{{$deletion->deletable->getParent()->getType()}}">@icon($deletion->deletable->getParent()->getType())</span>
86                             <div class="text-{{ $deletion->deletable->getParent()->getType() }}">
87                                 {{ $deletion->deletable->getParent()->name }}
88                             </div>
89                         </div>
90                         @endif
91                     </td>
92                     <td>@include('settings.parts.table-user', ['user' => $deletion->deleter, 'user_id' => $deletion->deleted_by])</td>
93                     <td width="200">{{ $deletion->created_at }}</td>
94                     <td width="150" class="text-right">
95                         <div component="dropdown" class="dropdown-container">
96                             <button type="button" refs="dropdown@toggle" class="button outline">{{ trans('common.actions') }}</button>
97                             <ul refs="dropdown@menu" class="dropdown-menu">
98                                 <li><a class="block" href="{{ $deletion->getUrl('/restore') }}">{{ trans('settings.recycle_bin_restore') }}</a></li>
99                                 <li><a class="block" href="{{ $deletion->getUrl('/destroy') }}">{{ trans('settings.recycle_bin_permanently_delete') }}</a></li>
100                             </ul>
101                         </div>
102                     </td>
103                 </tr>
104                 @endforeach
105             </table>
106
107             {!! $deletions->links() !!}
108
109         </div>
110
111     </div>
112 @stop