]> BookStack Code Mirror - bookstack/blob - resources/views/attachments/manager-list.blade.php
Opensearch: Fixed XML declaration when php short tags enabled
[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                 @if(userCan('attachment-update', $attachment))
20                     <button component="event-emit-select"
21                             option:event-emit-select:name="edit"
22                             option:event-emit-select:id="{{ $attachment->id }}"
23                             type="button"
24                             title="{{ trans('common.edit') }}"
25                             class="drag-card-action text-center text-link">@icon('edit')</button>
26                 @endif
27                 @if(userCan('attachment-delete', $attachment))
28                     <div component="dropdown" class="flex-fill relative">
29                         <button refs="dropdown@toggle"
30                                 type="button"
31                                 title="{{ trans('common.delete') }}"
32                                 class="drag-card-action text-center text-neg">@icon('close')</button>
33                         <div refs="dropdown@menu" class="dropdown-menu">
34                             <p class="text-neg small px-m mb-xs">{{ trans('entities.attachments_delete') }}</p>
35                             <button refs="ajax-delete-row@delete" type="button" class="text-link small delete text-item">{{ trans('common.confirm') }}</button>
36                         </div>
37                     </div>
38                 @endif
39             </div>
40         </div>
41     @endforeach
42     @if (count($attachments) === 0)
43         <p class="small text-muted">
44             {{ trans('entities.attachments_no_files') }}
45         </p>
46     @endif
47 </div>