mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
Move v1 views
This commit is contained in:
34
resources/views/attachments/delete.twig
Normal file
34
resources/views/attachments/delete.twig
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute().getName(), attachment) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="{{ route('attachments.destroy',attachment.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-12 col-sm-12">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('form.delete_attachment', {'name': attachment.filename}) }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="text-danger">
|
||||
{{ trans('form.permDeleteWarning') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ trans('form.attachment_areYouSure', {'name': attachment.filename}) }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn pull-right btn-danger"/>
|
||||
<a href="{{ URL.previous() }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
61
resources/views/attachments/edit.twig
Normal file
61
resources/views/attachments/edit.twig
Normal file
@@ -0,0 +1,61 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute().getName(), attachment) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('attachments.update', attachment.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update">
|
||||
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
<input type="hidden" name="id" value="{{ attachment.id }}"/>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.staticText('filename',attachment.filename|escape) }}
|
||||
{{ ExpandedForm.staticText('mime',attachment.mime|escape) }}
|
||||
{{ ExpandedForm.staticText('size',attachment.size|filesize) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('title', attachment.title) }}
|
||||
{{ ExpandedForm.textarea('notes',null,{helpText: trans('firefly.field_supports_markdown')}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
{# panel for options #}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'options'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.optionsList('update','attachment') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">
|
||||
{{ 'update_attachment'|_ }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
{% endblock %}
|
||||
77
resources/views/attachments/index.twig
Normal file
77
resources/views/attachments/index.twig
Normal file
@@ -0,0 +1,77 @@
|
||||
{% extends './v1/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">
|
||||
{{ 'list_all_attachments'|_ }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-striped sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-defaultsign="_19"> </th>
|
||||
<th data-defaultsign="az">{{ trans('list.file_name') }}</th>
|
||||
<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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for att in set %}
|
||||
<tr>
|
||||
<td data-value="{{ att.id }}">
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('attachments.edit', att.id) }}" class="btn btn-default"><span class="fa fa-pencil"></span></a>
|
||||
<a href="{{ route('attachments.delete', att.id) }}" class="btn btn-danger"><span class="fa fa-trash"></span></a>
|
||||
<a href="{{ route('attachments.download', att.id) }}" class="btn btn-default"><span class="fa fa-download"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
<td data-value="{{ att.filename }}">
|
||||
<a href="{{ route('attachments.view', att.id) }}" title="{{ att.filename }}">
|
||||
{{ att.filename }}
|
||||
</a>
|
||||
</td>
|
||||
<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 }}">
|
||||
{% if att.attachable_type == 'FireflyIII\\Models\\TransactionJournal' %}
|
||||
<a href="{{ route('transactions.show', [att.attachable_id]) }}">
|
||||
{{ att.attachable.description }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ att.attachable_type }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td data-value="{% if att.file_exists %}1{% else %}0{% endif %}">
|
||||
{% if att.file_exists %}
|
||||
<span class="fa fa-check text-success"></span>
|
||||
{% else %}
|
||||
<span class="fa fa-warning text-danger"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="v1/js/lib/bootstrap-sortable.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="v1/css/bootstrap-sortable.css?v={{ FF_VERSION }}" type="text/css" media="all" nonce="{{ JS_NONCE }}">
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user