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,57 @@
{% extends './v1/layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
{% endblock %}
{% block content %}
<form method="POST" action="{{ route('categories.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">
<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') }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for optional fields#}
<div class="box">
<div class="box-header with-border">
<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}) }) }}
</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','category') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'store_category'|_ }}
</button>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/ff/budgets/create.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@@ -0,0 +1,41 @@
{% extends './v1/layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, category) }}
{% endblock %}
{% block content %}
<form method="POST" action="{{ route('categories.destroy',category.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_category', {'name': category.name}) }}</h3>
</div>
<div class="box-body">
<p class="text-danger">
{{ trans('form.permDeleteWarning') }}
</p>
<p>
{{ trans('form.category_areYouSure', {'name': category.name}) }}
</p>
<p>
{% if category.transactionjournals.count() > 0 %}
{{ Lang.choice('form.category_keep_transactions', category.transactionjournals.count(), {count: category.transactionjournals.count() }) }}
{% endif %}
</p>
</div>
<div class="box-footer">
<input type="submit" name="submit" value="{{ trans('form.deletePermanently') }}" class="btn btn-danger pull-right"/>
<a href="{{ URL.previous() }}" class="btn-default btn">{{ trans('form.cancel') }}</a>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,58 @@
{% extends './v1/layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, category) }}
{% endblock %}
{% block content %}
{{ Form.model(category, {'class' : 'form-horizontal','enctype': 'multipart/form-data','id' : 'update','url' : route('categories.update',category.id)}) }}
<input type="hidden" name="id" value="{{ category.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.text('name') }}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
{# panel for optional fields#}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.textarea('notes', preFilled.notes, {helpText: trans('firefly.field_supports_markdown')} ) }}
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-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','category') }}
</div>
<div class="box-footer">
<button type="submit" class="btn pull-right btn-success">
{{ 'update_category'|_ }}
</button>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/ff/categories/edit.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@@ -0,0 +1,49 @@
{% extends './v1/layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
{% endblock %}
{% block content %}
{% if categories.count() > 0 %}
<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">{{ 'categories'|_ }}</h3>
<div class="box-tools pull-right">
<div class="btn-group">
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-v"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ route('categories.create') }}"><span class="fa fa-plus fa-fw"></span> {{ 'new_category'|_ }}</a></li>
</ul>
</div>
</div>
</div>
<div class="box-body no-padding">
<div style="padding:8px;">
<a class="btn btn-success" href="{{ route('categories.create') }}"><span class="fa fa-plus fa-fw"></span> {{ 'new_category'|_ }}</a>
</div>
{% include 'list/categories' %}
</div>
<div class="box-footer">
<a class="btn btn-success" href="{{ route('categories.create') }}"><span class="fa fa-plus fa-fw"></span> {{ 'new_category'|_ }}</a>
</div>
</div>
</div>
</div>
{% else %}
{% include 'partials.empty' with {objectType: 'default', type: 'categories',route: route('categories.create')} %}
{% endif %}
{% endblock %}
{% block styles %}
<link href="v1/css/bootstrap-sortable.css?v={{ FF_VERSION }}" type="text/css" rel="stylesheet" media="all" nonce="{{ JS_NONCE }}">
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="v1/js/lib/bootstrap-sortable.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/categories/index.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@@ -0,0 +1,64 @@
{% extends './v1/layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, start, end) }}
{% endblock %}
{% block content %}
{# upper show-all instruction #}
{% if periods|length > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-9 col-md-3 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('categories.no-category.all') }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
<div class="row">
<div class="{% if periods|length > 0 %}col-lg-10 col-md-9 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ subTitle }}</h3>
</div>
<div class="box-body ">
{% if periods|length > 0 %}
{% include 'list.groups' %}
<p>
<span class="fa fa-calendar"></span>
<a href="{{ route('categories.no-category.all') }}">{{ 'show_all_no_filter'|_ }}</a>
</p>
{% else %}
{% include 'list.groups' %}
<p>
<span class="fa fa-calendar"></span>
<a href="{{ route('categories.no-category') }}">{{ 'show_the_current_period_and_overview'|_ }}</a>
</p>
{% endif %}
</div>
</div>
</div>
{% if periods|length > 0 %}
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
{% include 'list.periods' %}
</div>
{% endif %}
</div>
{# lower show-all instruction #}
{% if periods|length > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-9 col-md-3 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('categories.no-category',['all']) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
{% endblock %}
{% block scripts %}
{# required for groups.twig #}
<script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}

View File

@@ -0,0 +1,122 @@
{% extends './v1/layout/default' %}
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, category, start, end) }}
{% endblock %}
{% block content %}
<div class="row">
{% if Route.getCurrentRoute.getName == 'categories.show' %}
{# both charts #}
<div class="{% if attachments.count() == 0 %}col-lg-6 col-md-12 col-sm-12 col-xs-12{% else %}col-lg-4 col-md-12 col-sm-12 col-xs-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ trans('firefly.chart_category_in_period', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat) }) }}
</h3>
</div>
<div class="box-body">
<canvas id="specific-period" style="width:100%;height:400px;" height="400" width="100%"></canvas>
</div>
</div>
</div>
<div class="{% if attachments.count() == 0 %}col-lg-6 col-md-12 col-sm-12 col-xs-12{% else %}col-lg-4 col-md-12 col-sm-12 col-xs-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ trans('firefly.chart_category_all', {name: category.name }) }}
</h3>
</div>
<div class="box-body">
<canvas id="category-everything" style="width:100%;height:400px;" height="400" width="100%"></canvas>
</div>
</div>
</div>
{% endif %}
{% if Route.getCurrentRoute.getName == 'categories.show.all' %}
{# all chart #}
<div class="{% if attachments.count() == 0 %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% else %}col-lg-8 col-md-12 col-sm-12 col-xs-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ trans('firefly.chart_category_all', {name: category.name }) }}
</h3>
</div>
<div class="box-body">
<canvas id="category-everything" style="width:100%;height:400px;" height="400" width="100%"></canvas>
</div>
</div>
</div>
{% endif %}
{% if attachments.count() > 0 %}
<div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">
{{ 'attachments'|_ }}
</h3>
</div>
<div class="box-body no-padding">
{% include 'list.attachments' %}
</div>
</div>
</div>
{% endif %}
</div>
{% if periods|length > 0 %}
<div class="row">
<div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12">
<p class="small text-center"><a href="{{ route('categories.show.all',[category.id]) }}">{{ 'showEverything'|_ }}</a></p>
</div>
</div>
{% endif %}
<div class="row">
<div class="{% if periods|length > 0 %}col-lg-10 col-md-8 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
</div>
<div class="box-body">
{% if periods|length > 0 %}
{% include 'list.groups' %}
<p>
<span class="fa fa-calendar"></span>
<a href="{{ route('categories.show.all', [category.id]) }}">
{{ 'show_all_no_filter'|_ }}
</a>
</p>
{% else %}
{% include 'list.groups' %}
<p>
<span class="fa fa-calendar"></span>
<a href="{{ route('categories.show', [category.id]) }}">
{{ 'show_the_current_period_and_overview'|_ }}
</a>
</p>
{% endif %}
</div>
</div>
</div>
{% if periods|length > 0 %}
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
{% include 'list.periods' %}
</div>
{% endif %}
</div>
{% endblock %}
{% block scripts %}
<script type="text/javascript" nonce="{{ JS_NONCE }}">
var current = '{{ route('chart.category.current', [category.id]) }}';
var everything = '{{ route('chart.category.all', [category.id]) }}';
var specific = '{{ route('chart.category.specific', [category.id, start.format('Ymd')]) }}';
</script>
<script type="text/javascript" src="v1/js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.defaults.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/charts.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" src="v1/js/ff/categories/show.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{# required for groups.twig #}
<script type="text/javascript" src="v1/js/ff/list/groups.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script>
{% endblock %}