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