This commit is contained in:
James Cole
2017-11-25 20:54:42 +01:00
parent 60abe2a3af
commit 0cf359b75f
11 changed files with 170 additions and 15 deletions

View File

@@ -6,7 +6,7 @@
{% block content %}
<form method="POST" action="{{ route('bills.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store">
<form method="POST" action="{{ route('bills.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store" enctype="multipart/form-data">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<div class="row">
@@ -32,9 +32,12 @@
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.integer('skip',0) }}
{{ ExpandedForm.checkbox('automatch',1,true) }}
{{ ExpandedForm.checkbox('active',1,true) }}
</div>
</div>

View File

@@ -6,7 +6,7 @@
{% block content %}
{{ Form.model(bill, {'class' : 'form-horizontal','id' : 'update','url' : route('bills.update', bill.id)}) }}
{{ Form.model(bill, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('bills.update', bill.id)}) }}
<input type="hidden" name="id" value="{{ bill.id }}"/>
@@ -34,6 +34,8 @@
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
{{ ExpandedForm.integer('skip') }}
{{ ExpandedForm.checkbox('automatch',1) }}
{{ ExpandedForm.checkbox('active',1) }}

View File

@@ -24,7 +24,7 @@
</div>
<div class="box-body">
<table class="table">
<table class="table table-striped">
<tr>
<td colspan="2">
{{ 'matching_on'|_ }}
@@ -84,12 +84,60 @@
<div class="box-header with-border">
<h3 class="box-title">{{ 'more'|_ }}</h3>
</div>
<div class="box-body">
<p>
<a href="{{ route('bills.rescan',bill.id) }}" class="btn btn-default">{{ 'rescan_old'|_ }}</a>
</p>
<div class="box-body no-padding">
{% if bill.notes.count == 1 %}
<table class="table">
<tr>
<td>{{ trans('list.notes') }}</td>
<td>{{ bill.notes.first.text|markdown }}</td>
</tr>
</table>
{% endif %}
</div>
<div class="box-footer">
<a href="{{ route('bills.rescan',bill.id) }}" class="btn btn-default">{{ 'rescan_old'|_ }}</a>
</div>
</div>
{% if bill.attachments|length > 0 %}
<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 bill.attachments %}
<tr>
<td>
<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>
</div>
</td>
<td>
<i class="fa {{ att.mime|mimeIcon }}"></i>
<a href="{{ route('attachments.download', att.id) }}" title="{{ att.filename }}">
{% if att.title %}
{{ att.title }}
{% else %}
{{ att.filename }}
{% endif %}
</a>
({{ att.size|filesize }})
{% if att.description %}
<br/>
<em>{{ att.description }}</em>
{% endif %}
</td>
<td style="width:100px;">
<img src="{{ route('attachments.preview', att.id) }}"/>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endif %}
</div>
</div>