mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 09:52:20 +00:00
Move v1 views
This commit is contained in:
46
resources/views/admin/link/create.twig
Normal file
46
resources/views/admin/link/create.twig
Normal file
@@ -0,0 +1,46 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="{{ route('admin.links.store') }}" accept-charset="UTF-8" class="form-horizontal">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }}
|
||||
{{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }}
|
||||
{{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }}
|
||||
</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('create','link_type') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">{{ 'store_new_link_type'|_ }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
53
resources/views/admin/link/delete.twig
Normal file
53
resources/views/admin/link/delete.twig
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, linkType) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="{{ route('admin.links.destroy',linkType.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_link_type', {'name': linkType.name}) }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="text-danger">
|
||||
{{ trans('form.permDeleteWarning') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ trans('form.linkType_areYouSure', {'name': linkType.name,'inward': linkType.inward,'outward': linkType.outward}) }}
|
||||
</p>
|
||||
|
||||
{% if count > 0 %}
|
||||
<p>
|
||||
{{ Lang.choice('form.also_delete_connections', count, {count: count}) }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if count > 0 %}
|
||||
<p class="text-success">
|
||||
{{ 'save_connections_by_moving'|_ }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ Form.select('move_link_type_before_delete', moveTo, null, {class: 'form-control'}) }}
|
||||
</p>
|
||||
{% else %}
|
||||
<input type="hidden" name="move_link_type_before_delete" value="0"/>
|
||||
{% endif %}
|
||||
|
||||
</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 %}
|
||||
50
resources/views/admin/link/edit.twig
Normal file
50
resources/views/admin/link/edit.twig
Normal file
@@ -0,0 +1,50 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, linkType) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ Form.model(linkType, {'class' : 'form-horizontal','id' : 'update','url' : route('admin.links.update', linkType.id) } ) }}
|
||||
<input type="hidden" name="id" value="{{ linkType.id }}"/>
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }}
|
||||
{{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }}
|
||||
{{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }}
|
||||
</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','link_type') }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">
|
||||
{{ ('update_link_type')|_ }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
68
resources/views/admin/link/index.twig
Normal file
68
resources/views/admin/link/index.twig
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'journal_link_configuration'|_ }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="hidden-sm hidden-xs" data-defaultsort="disabled"> </th>
|
||||
<th data-defaultsign="az">{{ trans('list.name') }}</th>
|
||||
<th class="hidden-sm hidden-xs" data-defaultsign="az">{{ trans('list.inward') }}</th>
|
||||
<th class="hidden-sm hidden-xs" data-defaultsign="az">{{ trans('list.outward') }}</th>
|
||||
<th data-defaultsign="_19">{{ trans('list.number_of_transactions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for linkType in linkTypes %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if linkType.editable %}
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a class="btn btn-default btn-xs" href="{{ route('admin.links.edit',linkType.id) }}"><span
|
||||
class="fa fa-fw fa-pencil"></span></a>
|
||||
<a class="btn btn-danger btn-xs" href="{{ route('admin.links.delete',linkType.id) }}"><span
|
||||
class="fa fa-fw fa-trash-o"></span></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ journalLinkTranslation('name', linkType.name) }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ journalLinkTranslation('inward', linkType.inward) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ journalLinkTranslation('outward', linkType.outward) }}
|
||||
</td>
|
||||
<td data-value="{{ linkType.journalCount }}">
|
||||
<a href="{{ route('admin.links.show', [linkType.id]) }}">{{ linkType.journalCount }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="{{ route('admin.links.create') }}" class="btn btn-success">{{ 'create_new_link_type'|_ }}</a>
|
||||
</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 %}
|
||||
87
resources/views/admin/link/show.twig
Normal file
87
resources/views/admin/link/show.twig
Normal file
@@ -0,0 +1,87 @@
|
||||
{% extends './v1/layout/default' %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, linkType) }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('firefly.overview_for_link', {name: journalLinkTranslation('name', linkType.name)}) }}</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-hover sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{{ trans('firefly.inward_transaction') }}</th>
|
||||
<th> </th>
|
||||
<th>{{ trans('firefly.link_description') }}</th>
|
||||
<th>{{ trans('firefly.outward_transaction') }}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for link in links %}
|
||||
<tr>
|
||||
<td>
|
||||
<div class="btn-group btn-group-xs">
|
||||
<a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger delete-link" data-id="{{ link.id }}"><span class="fa fa-trash"></span></a>
|
||||
<a href="#" class="btn btn-default switch-link" data-id="{{ link.id }}"><span
|
||||
class="fa fa-fw fa-arrows-h"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
<td data-value="{{ link.source.description }}">
|
||||
<a href="{{ route('transactions.show', [link.source.transaction_group_id]) }}">{{ link.source.description }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ journalObjectAmount(link.source) }}
|
||||
</td>
|
||||
<td>{{ journalLinkTranslation('outward', linkType.outward) }}</td>
|
||||
<td data-value="{{ link.destination.description }}">
|
||||
<a href="{{ route('transactions.show', [link.destination.transaction_group_id]) }}">{{ link.destination.description }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ journalObjectAmount(link.destination) }}
|
||||
</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>
|
||||
<script nonce="{{ JS_NONCE }}">
|
||||
$('.switch-link').on('click', switchLink);
|
||||
var switchLinkUrl = '{{ route('transactions.link.switch') }}';
|
||||
function switchLink(e) {
|
||||
e.preventDefault();
|
||||
var obj = $(e.currentTarget);
|
||||
|
||||
$.post(switchLinkUrl, {
|
||||
_token: token,
|
||||
id: obj.data('id')
|
||||
}).done(function () {
|
||||
location.reload();
|
||||
}).fail(function () {
|
||||
console.error('I failed :(');
|
||||
});
|
||||
|
||||
//alert(obj.data('id'));
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
</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