firefly-iii/resources/views/v1/attachments/index.twig

78 lines
4.0 KiB
Twig
Raw Normal View History

2018-04-27 23:34:01 -05:00
{% extends "./layout/default" %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
2018-04-27 23:53:37 -05:00
{{ 'list_all_attachments'|_ }}
2018-04-27 23:34:01 -05:00
</h3>
</div>
<div class="box-body no-padding">
2018-04-27 23:53:37 -05:00
<table class="table table-striped sortable">
2018-04-27 23:34:01 -05:00
<thead>
<tr>
<th data-defaultsign="_19">&nbsp;</th>
<th data-defaultsign="az">{{ trans('list.file_name') }}</th>
2018-04-27 23:53:37 -05:00
<th data-defaultsign="_19">{{ trans('list.file_size') }}</th>
<th data-defaultsign="az">{{ trans('list.file_type') }}</th>
<th data-defaultsign="az">{{ trans('list.attached_to') }}</th>
<th data-defaultsign="_19">{{ trans('list.file_exists') }}</th>
2018-04-27 23:34:01 -05:00
</tr>
</thead>
<tbody>
{% for att in set %}
<tr>
2018-04-27 23:53:37 -05:00
<td data-value="{{ att.id }}">
2018-04-27 23:44:37 -05:00
<div class="btn-group btn-group-xs">
<a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><i class="fa fa-pencil"></i></a>
<a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><i class="fa fa-trash"></i></a>
<a href="{{ route('attachments.download', att.id) }}" class="btn btn-default"><i class="fa fa-download"></i></a>
</div>
</td>
2018-04-27 23:53:37 -05:00
<td data-value="{{ att.filename }}">
2018-04-27 23:44:37 -05:00
<a href="{{ route('attachments.view', att.id) }}" title="{{ att.filename }}">
2018-04-27 23:53:37 -05:00
{{ att.filename }}
2018-04-27 23:44:37 -05:00
</a>
2018-04-27 23:34:01 -05:00
</td>
2018-04-27 23:53:37 -05:00
<td data-value="{{ att.size }}">{{ att.size|filesize }}</td>
<td data-value="{{ att.mime }}">{{ att.mime }}</td>
<td data-value="{{ att.attachable_type }}_{{ att.attachable_id }}">
2018-04-27 23:34:01 -05:00
{% if att.attachable_type == 'FireflyIII\\Models\\TransactionJournal' %}
<a href="{{ route('transactions.show', [att.attachable_id]) }}">
{{ att.attachable.description }}
</a>
2018-04-27 23:53:37 -05:00
{% else %}
{{ att.attachable_type }}
2018-04-27 23:34:01 -05:00
{% endif %}
</td>
2018-04-27 23:53:37 -05:00
<td data-value="{% if att.file_exists %}1{% else %}0{% endif %}">
2018-04-27 23:34:01 -05:00
{% if att.file_exists %}
<i class="fa fa-check text-success"></i>
{% else %}
<i class="fa fa-warning text-danger"></i>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
2018-04-27 23:53:37 -05:00
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/bootstrap-sortable.js?v={{ FF_VERSION }}"></script>
2018-04-27 23:53:37 -05:00
{% endblock %}
2018-04-27 23:34:01 -05:00
{% block styles %}
<link rel="stylesheet" href="v1/css/bootstrap-sortable.css?v={{ FF_VERSION }}" type="text/css" media="all"/>
2018-04-27 23:34:01 -05:00
{% endblock %}