]> BookStack Code Mirror - bookstack/blob - resources/views/exports/import-show.blade.php
Perms: Fixed some issues made when adding transactions
[bookstack] / resources / views / exports / import-show.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4     <div class="container small">
5
6         <main class="card content-wrap auto-height mt-xxl">
7             <h1 class="list-heading">{{ trans('entities.import_continue') }}</h1>
8             <p class="text-muted">{{ trans('entities.import_continue_desc') }}</p>
9
10             @if(session()->has('import_errors'))
11                 <div class="mb-m">
12                     <label class="setting-list-label mb-xs text-neg">@icon('warning') {{ trans('entities.import_errors') }}</label>
13                     <p class="mb-xs small">{{ trans('entities.import_errors_desc') }}</p>
14                     @foreach(session()->get('import_errors') ?? [] as $error)
15                         <p class="mb-none text-neg">{{ $error }}</p>
16                     @endforeach
17                     <hr class="mt-m">
18                 </div>
19             @endif
20
21             <div class="mb-m">
22                 <label class="setting-list-label mb-m">{{ trans('entities.import_details') }}</label>
23                 <div class="flex-container-row justify-space-between wrap">
24                     <div>
25                         @include('exports.parts.import-item', ['type' => $import->type, 'model' => $data])
26                     </div>
27                     <div class="text-right text-muted">
28                         <div>{{ trans('entities.import_size', ['size' => $import->getSizeString()]) }}</div>
29                         <div><span title="{{ $import->created_at->toISOString() }}">{{ trans('entities.import_uploaded_at', ['relativeTime' => $import->created_at->diffForHumans()]) }}</span></div>
30                         @if($import->createdBy)
31                             <div>
32                                 {{ trans('entities.import_uploaded_by') }}
33                                 <a href="{{ $import->createdBy->getProfileUrl() }}">{{ $import->createdBy->name }}</a>
34                             </div>
35                         @endif
36                     </div>
37                 </div>
38             </div>
39
40             <form id="import-run-form"
41                   action="{{ $import->getUrl() }}"
42                   method="POST">
43                 {{ csrf_field() }}
44
45                 @if($import->type === 'page' || $import->type === 'chapter')
46                     <hr>
47                     <label class="setting-list-label">{{ trans('entities.import_location') }}</label>
48                     <p class="small mb-s">{{ trans('entities.import_location_desc') }}</p>
49                     @if($errors->has('parent'))
50                         <div class="mb-s">
51                             @include('form.errors', ['name' => 'parent'])
52                         </div>
53                     @endif
54                     @include('entities.selector', [
55                         'name' => 'parent',
56                         'entityTypes' => $import->type === 'page' ? 'chapter,book' : 'book',
57                         'entityPermission' => "{$import->type}-create",
58                         'selectorSize' => 'compact small',
59                     ])
60                 @endif
61
62                 <div class="flex-container-row items-center justify-flex-end">
63                     <a href="{{ url('/import') }}" class="button outline">{{ trans('common.cancel') }}</a>
64                     <div component="dropdown" class="inline block mx-s">
65                         <button refs="dropdown@toggle"
66                                 type="button"
67                                 title="{{ trans('common.delete') }}"
68                                 class="button outline">{{ trans('common.delete') }}</button>
69                         <div refs="dropdown@menu" class="dropdown-menu">
70                             <p class="text-neg bold small px-m mb-xs">{{ trans('entities.import_delete_confirm') }}</p>
71                             <p class="small px-m mb-xs">{{ trans('entities.import_delete_desc') }}</p>
72                             <button type="submit" form="import-delete-form" class="text-link small text-item">{{ trans('common.confirm') }}</button>
73                         </div>
74                     </div>
75                     <button component="loading-button" type="submit" class="button">{{ trans('entities.import_run') }}</button>
76                 </div>
77             </form>
78         </main>
79     </div>
80
81     <form id="import-delete-form"
82           action="{{ $import->getUrl() }}"
83           method="post">
84         {{ method_field('DELETE') }}
85         {{ csrf_field() }}
86     </form>
87
88 @stop