A fix in the model and a simple view for attachments.

This commit is contained in:
James Cole
2015-07-18 21:12:34 +02:00
parent 6a9574bab9
commit 359fab315f
4 changed files with 52 additions and 2 deletions

View File

@@ -52,6 +52,10 @@
</td>
<td>
<a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
{% if journal.attachments|length > 0 %}
<i class="fa fa-paperclip pull-right"></i>
{% endif %}
</td>
<td>
{% if not hideTags %}

View File

@@ -74,6 +74,30 @@
</div>
</div>
</div>
<!-- attachments -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'attachments'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-hover">
{% for att in journal.attachments %}
<tr>
<td>
<a href="#" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></a>
</td>
<td>
<i class="fa fa-file-pdf-o"></i>
<a href="#">{{ att.filename }}</a>
({{ att.size|filesize }})
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<!-- events, if present -->
{% if journal.piggyBankEvents|length > 0 %}
<div class="box">