]> BookStack Code Mirror - bookstack/blob - resources/views/attachments/manager-list.blade.php
0e841a042f7ef6cd0ed0b08b2edeba79c96e0f50
[bookstack] / resources / views / attachments / manager-list.blade.php
1 <div component="sortable-list"
2      option:sortable-list:handle-selector=".handle, a">
3     @foreach($attachments as $attachment)
4         <div component="ajax-delete-row"
5              option:ajax-delete-row:url="{{ url('/attachments/' . $attachment->id) }}"
6              data-id="{{ $attachment->id }}"
7              data-drag-content="{{ json_encode($attachment->editorContent()) }}"
8              class="card drag-card">
9             <div class="handle">@icon('grip')</div>
10             <div class="py-s">
11                 <a href="{{ $attachment->getUrl() }}" target="_blank" rel="noopener">{{ $attachment->name }}</a>
12             </div>
13             <div class="flex-fill justify-flex-end">
14                 <button component="event-emit-select"
15                         option:event-emit-select:name="insert"
16                         type="button"
17                         title="{{ trans('entities.attachments_insert_link') }}"
18                         class="drag-card-action text-center text-link">@icon('link')                 </button>
19                 <button component="event-emit-select"
20                         option:event-emit-select:name="edit"
21                         option:event-emit-select:id="{{ $attachment->id }}"
22                         type="button"
23                         title="{{ trans('common.edit') }}"
24                         class="drag-card-action text-center text-link">@icon('edit')</button>
25                 <div component="dropdown" class="flex-fill relative">
26                     <button refs="dropdown@toggle"
27                             type="button"
28                             title="{{ trans('common.delete') }}"
29                             class="drag-card-action text-center text-neg">@icon('close')</button>
30                     <div refs="dropdown@menu" class="dropdown-menu">
31                         <p class="text-neg small px-m mb-xs">{{ trans('entities.attachments_delete') }}</p>
32                         <button refs="ajax-delete-row@delete" type="button" class="text-link small delete text-item">{{ trans('common.confirm') }}</button>
33                     </div>
34                 </div>
35             </div>
36         </div>
37     @endforeach
38     @if (count($attachments) === 0)
39         <p class="small text-muted">
40             {{ trans('entities.attachments_no_files') }}
41         </p>
42     @endif
43 </div>