Move v1 views

This commit is contained in:
James Cole
2022-01-29 14:15:34 +01:00
parent a12fd4a3ae
commit 6da6a68e33
251 changed files with 17989 additions and 0 deletions

View 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 %}

View 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 %}

View 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 %}

View 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">&nbsp;</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 %}

View 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>&nbsp;</th>
<th>{{ trans('firefly.inward_transaction') }}</th>
<th>&nbsp;</th>
<th>{{ trans('firefly.link_description') }}</th>
<th>{{ trans('firefly.outward_transaction') }}</th>
<th>&nbsp;</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 %}