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