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