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>
11 <a href="{{ $attachment->getUrl() }}" target="_blank" rel="noopener">{{ $attachment->name }}</a>
13 <div class="flex-fill justify-flex-end">
14 <button component="event-emit-select"
15 option:event-emit-select:name="insert"
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 }}"
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"
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>
38 @if (count($attachments) === 0)
39 <p class="small text-muted">
40 {{ trans('entities.attachments_no_files') }}