Files
firefly-iii/resources/views/v1/list/attachments.twig
2021-04-08 10:23:35 +02:00

48 lines
2.3 KiB
Twig

<table class="table table-responsive table-hover">
{% for attachment in attachments %}
<tr>
<td style="width:120px;">
<div class="btn-group btn-group-xs">
<a href="{{ route('attachments.edit', attachment.id) }}" class="btn btn-default"><i
class="fa fa-pencil"></i></a>
<a href="{{ route('attachments.delete', attachment.id) }}" class="btn btn-danger"><i
class="fa fa-trash"></i></a>
{% if attachment.file_exists %}
<a href="{{ route('attachments.download', attachment.id) }}" class="btn btn-default"><i
class="fa fa-download"></i></a>
{% endif %}
{% if not attachment.file_exists %}
<a href="#" class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i></a>
{% endif %}
</div>
</td>
<td>
{% if attachment.file_exists %}
<i class="fa {{ attachment.mime|mimeIcon }}"></i>
<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 %}
<i class="fa fa-fw fa-exclamation-triangle"></i>
{% if attachment.title %}
{{ attachment.title }}
{% else %}
{{ attachment.filename }}
{% endif %}
<br>
<span class="text-danger">{{ 'attachment_not_found'|_ }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>