Files
firefly-iii/resources/views/list/attachments.blade.php
2026-06-25 22:41:06 +02:00

48 lines
2.3 KiB
PHP

<table class="table table-responsive table-hover">
{% for attachment in attachments %}
<tr>
<td class="onetwenty">
<div class="btn-group btn-group-sm">
<a href="{{ route('attachments.edit', attachment.id) }}" class="btn btn-outline-secondary"><span
class="bi bi-pencil"></span></a>
<a href="{{ route('attachments.delete', attachment.id) }}" class="btn btn-danger"><span
class="bi bi-trash"></span></a>
{% if attachment.file_exists %}
<a href="{{ route('attachments.download', attachment.id) }}" class="btn btn-outline-secondary"><span
class="bi bi-download"></span></a>
@endif
{% if not attachment.file_exists %}
<a href="#" class="btn btn-danger"><span class="bi bi-exclamation-triangle"></span></a>
@endif
</div>
</td>
<td>
{% if attachment.file_exists %}
<span class="fa {{ attachment.mime|mimeIcon }}"></span>
<a href="{{ route('attachments.view', attachment.id) }}" title="{{ attachment.filename }}">
{% if attachment.title %}
{{ attachment.title }}
@else
{{ attachment.filename }}
@endif
</a>
({{ attachment.size|filesize }})
{% if null != attachment.notes_text and '' != attachment.notes_text %}
{{ attachment.notes_text|default('')|markdown }}
@endif
@endif
{% if not attachment.file_exists %}
<span class="bi bi-exclamation-triangle"></span>
{% if attachment.title %}
{{ attachment.title }}
@else
{{ attachment.filename }}
@endif
<br>
<span class="text-danger">{{ 'attachment_not_found'|_ }}</span>
@endif
</td>
</tr>
@endforeach
</table>