]> BookStack Code Mirror - bookstack/blob - resources/views/exports/import.blade.php
Tests: Updated comment test to account for new editor usage
[bookstack] / resources / views / exports / import.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4
5     <div class="container small">
6
7         <main class="card content-wrap auto-height mt-xxl">
8             <h1 class="list-heading">{{ trans('entities.import') }}</h1>
9             <form action="{{ url('/import') }}" enctype="multipart/form-data" method="POST">
10                 {{ csrf_field() }}
11                 <div class="flex-container-row justify-space-between wrap gap-x-xl gap-y-s">
12                     <p class="flex min-width-l text-muted mb-s">{{ trans('entities.import_desc') }}</p>
13                     <div class="flex-none min-width-l flex-container-row justify-flex-end">
14                         <div class="mb-m">
15                             <label for="file">{{ trans('entities.import_zip_select') }}</label>
16                             <input type="file"
17                                    accept=".zip,application/zip,application/x-zip-compressed"
18                                    name="file"
19                                    id="file"
20                                    class="custom-simple-file-input">
21                             @include('form.errors', ['name' => 'file'])
22                         </div>
23                     </div>
24                 </div>
25
26                 @if(count($zipErrors) > 0)
27                     <p class="mb-xs"><strong class="text-neg">{{ trans('entities.import_zip_validation_errors') }}</strong></p>
28                     <ul class="mb-m">
29                         @foreach($zipErrors as $key => $error)
30                             <li><strong class="text-neg">[{{ $key }}]</strong>: {{ $error }}</li>
31                         @endforeach
32                     </ul>
33                 @endif
34
35                 <div class="text-right">
36                     <a href="{{ url('/books') }}" class="button outline">{{ trans('common.cancel') }}</a>
37                     <button type="submit" class="button">{{ trans('entities.import_validate') }}</button>
38                 </div>
39             </form>
40         </main>
41
42         <main class="card content-wrap auto-height mt-xxl">
43             <h2 class="list-heading">{{ trans('entities.import_pending') }}</h2>
44             @if(count($imports) === 0)
45                 <p>{{ trans('entities.import_pending_none') }}</p>
46             @else
47                 <div class="item-list my-m">
48                     @foreach($imports as $import)
49                         @include('exports.parts.import', ['import' => $import])
50                     @endforeach
51                 </div>
52             @endif
53         </main>
54     </div>
55
56 @stop