Various code cleanup.

Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
James Cole
2016-08-27 03:50:35 +02:00
parent a9444ac702
commit a0ea3882e1
43 changed files with 385 additions and 367 deletions

View File

@@ -4,21 +4,21 @@
{{ Breadcrumbs.renderIfExists }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'user_administration'|_ }}</h3>
</div>
<div class="box-body">
<ul>
<li><a href="{{ route('admin.users') }}">{{ 'list_all_users'|_ }}</a></li>
<li><a href="{{ route('admin.users.domains') }}">{{ 'blocked_domains'|_ }}</a></li>
<!-- <li><a href="#">{{ 'user_related_settings'|_ }}</a></li> -->
</ul>
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'user_administration'|_ }}</h3>
</div>
<div class="box-body">
<ul>
<li><a href="{{ route('admin.users') }}">{{ 'list_all_users'|_ }}</a></li>
<li><a href="{{ route('admin.users.domains') }}">{{ 'blocked_domains'|_ }}</a></li>
<!-- <li><a href="#">{{ 'user_related_settings'|_ }}</a></li> -->
</ul>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -48,7 +48,8 @@
{% for limit in limits %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('budgets.showWithRepetition',[budget.id,limit.id]) }}">{{ limit.startdate.formatLocalized(monthFormat) }}</a>
<h3 class="box-title"><a
href="{{ route('budgets.showWithRepetition',[budget.id,limit.id]) }}">{{ limit.startdate.formatLocalized(monthFormat) }}</a>
</h3>
</div>
<div class="box-body">

View File

@@ -37,7 +37,8 @@
{% if currency.id == defaultCurrency.id %}
<span class="label label-success">{{ 'default_currency'|_ }}</span>
{% else %}
<a class="btn btn-info btn-xs" href="{{ route('currency.default',currency.id) }}">{{ 'make_default_currency'|_ }}</a>
<a class="btn btn-info btn-xs"
href="{{ route('currency.default',currency.id) }}">{{ 'make_default_currency'|_ }}</a>
{% endif %}
</td>
</tr>

View File

@@ -10,14 +10,14 @@
Hey there,
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
Firefly III has just blocked a login from user #{{ user_id }} ({{ user_address }}).
Firefly III has just blocked a login from user #{{ user_id }} ({{ user_address }}).
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The blocked code was "{{ code }}".
The blocked code was "{{ code }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:11px;color:#aaa;">
The login attempt came from IP {{ ip }}.
The login attempt came from IP {{ ip }}.
</p>
</body>

View File

@@ -10,14 +10,14 @@
Hey there,
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
Firefly III has just blocked a registration for an email addres at domain {{ blocked_domain }}.
Firefly III has just blocked a registration for an email addres at domain {{ blocked_domain }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The blocked email address was "{{ email_address }}".
The blocked email address was "{{ email_address }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:11px;color:#aaa;">
The login attempt came from IP {{ ip }}.
The login attempt came from IP {{ ip }}.
</p>
</body>

View File

@@ -11,7 +11,8 @@
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
To start using your brand new Firefly III account, you need to activate it. Activating your account allows the website to verify that this email address is valid. Unfortunately, not even the most complex routines can work this out, without actually sending an email message. And here it is!
To start using your brand new Firefly III account, you need to activate it. Activating your account allows the website to verify that this email address is
valid. Unfortunately, not even the most complex routines can work this out, without actually sending an email message. And here it is!
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">

View File

@@ -10,11 +10,11 @@
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The error was of type "{{ class }}".
The error was of type "{{ class }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The error occured on/at: {{ time }}.
The error occured on/at: {{ time }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
@@ -23,14 +23,14 @@ The error occured on/at: {{ time }}.
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
{% if loggedIn %}
The error was encountered by user #{{ user.id }}, <a href="mailto:{{ user.email }}">{{ user.email }}</a>.
The error was encountered by user #{{ user.id }}, <a href="mailto:{{ user.email }}">{{ user.email }}</a>.
{% else %}
There was no user logged in for this error or no user was detected.
There was no user logged in for this error or no user was detected.
{% endif %}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The IP address related to this error is: {{ ip }}
The IP address related to this error is: {{ ip }}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">

View File

@@ -10,11 +10,11 @@
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The error was of type "{{ class }}".
The error was of type "{{ class }}".
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The error occured on/at: {{ time }}.
The error occured on/at: {{ time }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
@@ -30,7 +30,7 @@ The error occured on/at: {{ time }}.
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
The IP address related to this error is: {{ ip }}
The IP address related to this error is: {{ ip }}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">

View File

@@ -7,9 +7,9 @@ The error occured on/at: {{ time }}.
This error occured in file "{{ file }}" on line {{ line }} with code {{ code }}.
{% if loggedIn %}
The error was encountered by user #{{ user.id }}, {{ user.email }}.
{% else %}
There was no user logged in for this error or no user was detected.
The error was encountered by user #{{ user.id }}, {{ user.email }}.
{% else %}
There was no user logged in for this error or no user was detected.
{% endif %}
The IP address related to this error is: {{ ip }}

View File

@@ -12,9 +12,10 @@
display: table;
font-family: 'Roboto', sans-serif;
}
p {
color:#575e62;
font-size:1.5em;
color: #575e62;
font-size: 1.5em;
}
.container {

View File

@@ -33,7 +33,8 @@
</div>
<div id="export-download" style="display:none;">
<p class="text-center text-info" id="download-holder">
<a id="download-link" class="btn btn-lg btn-success" href="{{ route('export.download', job.key) }}"><i class="fa fa-fw fa-download"></i> Download</a>
<a id="download-link" class="btn btn-lg btn-success" href="{{ route('export.download', job.key) }}"><i
class="fa fa-fw fa-download"></i> Download</a>
</p>
</div>
<div id="export-error" style="display:none;">

View File

@@ -4,7 +4,7 @@
<div class="col-sm-8">
{% for value,description in list %}
{% set options = options|merge({'id': 'ffInput_'~name~'_'~value}) %}
<div class="checkbox">
<div class="checkbox">
<label>
{% if value in selected %}
{{ Form.checkbox(name~'[]', value, true, options) }}

View File

@@ -32,17 +32,17 @@
</div>
{% endif %}
{% if type == 'create' and name == 'transaction' %}
<div class="form-group">
<label for="{{ name }}_split" class="col-sm-4 control-label">
{{ trans('form.split_journal') }}
</label>
<div class="form-group">
<label for="{{ name }}_split" class="col-sm-4 control-label">
{{ trans('form.split_journal') }}
</label>
<div class="col-sm-8">
<div class="radio"><label>
{{ Form.checkbox('split_journal', '1', Input.old('split_journal') == '1', {'id': name ~ 'split'}) }}
{{ trans('form.split_journal_explanation') }}
</label>
<div class="col-sm-8">
<div class="radio"><label>
{{ Form.checkbox('split_journal', '1', Input.old('split_journal') == '1', {'id': name ~ 'split'}) }}
{{ trans('form.split_journal_explanation') }}
</label>
</div>
</div>
</div>
</div>
{% endif %}

View File

@@ -19,10 +19,12 @@
</p>
<div class="row">
<div class="col-lg-4">
<a href="{{ route('import.download', [job.key]) }}" class="btn btn-default"><i class="fa fa-fw fa-download"></i> {{ 'import_download_config'|_ }}</a>
<a href="{{ route('import.download', [job.key]) }}" class="btn btn-default"><i
class="fa fa-fw fa-download"></i> {{ 'import_download_config'|_ }}</a>
</div>
<div class="col-lg-4">
<a href="{{ route('import.status', [job.key]) }}" class="btn btn-success"><i class="fa fa-fw fa-gears"></i> {{ 'import_start_import'|_ }}</a>
<a href="{{ route('import.status', [job.key]) }}" class="btn btn-success"><i
class="fa fa-fw fa-gears"></i> {{ 'import_start_import'|_ }}</a>
</div>
</div>
</div>

View File

@@ -49,14 +49,14 @@
<em>{{ trans('csv.no_example_data') }}</em>
{% else %}
{% for example in data.columns[i] %}
<code>{{ example }}</code><br />
<code>{{ example }}</code><br/>
{% endfor %}
{% endif %}
<td>
{{ Form.select(('role['~loop.index0~']'),
data.available_roles,
job.configuration['column-roles'][loop.index0],
job.configuration['column-roles'][loop.index0],
{class: 'form-control'}) }}
</td>
<td>

View File

@@ -11,13 +11,13 @@
<h3 class="box-title">{{ 'import_status_header'|_ }}</h3>
</div>
<div class="box-body">
<div class="progress" id="import-status-holder">
<div id="import-status-bar" class="progress-bar progress-bar-info active progress-bar-striped" role="progressbar"
aria-valuenow="100" aria-valuemin="0"
aria-valuemax="100" style="width: 100%">
</div>
</div>
<p id="import-status-txt">{{ 'import_status_settings_complete'|_ }}</p>
<div class="progress" id="import-status-holder">
<div id="import-status-bar" class="progress-bar progress-bar-info active progress-bar-striped" role="progressbar"
aria-valuenow="100" aria-valuemin="0"
aria-valuemax="100" style="width: 100%">
</div>
</div>
<p id="import-status-txt">{{ 'import_status_settings_complete'|_ }}</p>
</div>
</div>
</div>

View File

@@ -31,7 +31,7 @@
<!-- favicons -->
{% include('partials/favicons.twig') %}
</head>
<body class="skin-blue-light sidebar-mini">
<div class="wrapper">
@@ -92,7 +92,7 @@
<form action="{{ route('search') }}" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search..." value="{{ query }}"/>
<span class="input-group-btn">
<span class="input-group-btn">
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>

View File

@@ -7,9 +7,9 @@
href="{{ route('transactions.show',journal.id) }}"
{% endif %}
>
{{ journal|typeIcon }}
{{ journal.description }}
<span class="pull-right small">
{{ journal|typeIcon }}
{{ journal.description }}
<span class="pull-right small">
{{ journal|formatJournal }}
</span>
</a>

View File

@@ -130,7 +130,7 @@
</li>
<!-- options and preferences -->
<li id="option-menu" class="{{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currency') }} treeview">
<li id="option-menu" class="{{ activeRoutePartial('admin') }} {{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currency') }} treeview">
<a href="#">
<i class="fa fa-gears fa-fw"></i>
<span>{{ 'options'|_ }}</span>
@@ -147,6 +147,12 @@
<li class="{{ activeRoutePartial('currency') }}">
<a class="{{ activeRoutePartial('currency') }}" href="{{ route('currency.index') }}"><i class="fa fa-usd fa-fw"></i> {{ 'currencies'|_ }}</a>
</li>
<!-- admin (if user admin) -->
{% if Auth.user.hasRole('owner') %}
<li class="{{ activeRoutePartial('admin') }}">
<a class="{{ activeRoutePartial('admin') }}" href="{{ route('admin.index') }}"><i class="fa fa-hand-spock-o fa-fw"></i> {{ 'administration'|_ }}</a>
</li>
{% endif %}
</ul>

View File

@@ -4,7 +4,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="budgetSpentAmountLabel">
{{ trans('firefly.budget_spent_amount', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat), budget: budget.name})}}
{{ trans('firefly.budget_spent_amount', {start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat), budget: budget.name}) }}
</h4>
</div>
<div class="modal-body">

View File

@@ -3,7 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="expenseEntryTitle">{{ trans('firefly.category_entry', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
<h4 class="modal-title"
id="expenseEntryTitle">{{ trans('firefly.category_entry', {name: category.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
</div>
<div class="modal-body">
{% set hideCategory = true %}

View File

@@ -3,7 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="expenseEntryTitle">{{ trans('firefly.expense_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
<h4 class="modal-title"
id="expenseEntryTitle">{{ trans('firefly.expense_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
</div>
<div class="modal-body">
{% set hideDestination = true %}

View File

@@ -3,7 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="incomeEntryTitle">{{ trans('firefly.income_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
<h4 class="modal-title"
id="incomeEntryTitle">{{ trans('firefly.income_entry', {name: account.name, start: start.formatLocalized(monthAndDayFormat), end: end.formatLocalized(monthAndDayFormat)}) }}</h4>
</div>
<div class="modal-body">
{% set hideBudget = true %}

View File

@@ -7,7 +7,7 @@
{% block content %}
{{ Form.open({'class' : 'form-horizontal','id' : 'preferences.code'}) }}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_two_factor_auth_code'|_ }}</h3>
@@ -18,15 +18,15 @@
</p>
<div class="form group">
<div class="col-sm-8 col-md-offset-4">
<img src="{{ image }}" alt="" title="" />
<br /><br />
<img src="{{ image }}" alt="" title=""/>
<br/><br/>
</div>
</div>
{{ ExpandedForm.text('code', code) }}
</div>
</div>
</div>
</div>
</div>

View File

@@ -160,38 +160,38 @@
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_two_factor_auth'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">{{ 'pref_two_factor_auth_help'|_ }}</p>
<p class="text-info">{{ 'pref_two_factor_auth_help'|_ }}</p>
<div class="form-group">
<div class="col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox" name="twoFactorAuthEnabled" value="1"
{% if is2faEnabled == '1' %} checked {% endif %}> {{ 'pref_enable_two_factor_auth'|_ }}
{% if is2faEnabled == '1' %} checked {% endif %}> {{ 'pref_enable_two_factor_auth'|_ }}
</label>
</div>
</div>
{% if is2faEnabled == 1 and has2faSecret == true %}
<div class="col-sm-10">
<div class="checkbox">
<label>
<a href="{{ route('preferences.code') }}">{{ 'pref_two_factor_auth_reset_code'|_ }}</a>
</label>
<div class="col-sm-10">
<div class="checkbox">
<label>
<a href="{{ route('preferences.code') }}">{{ 'pref_two_factor_auth_reset_code'|_ }}</a>
</label>
</div>
<div class="checkbox">
<label>
<a href="{{ route('preferences.delete-code') }}">{{ 'pref_two_factor_auth_remove_code'|_ }}</a>
{{ 'pref_two_factor_auth_remove_will_disable'|_ }}
</label>
</div>
</div>
<div class="checkbox">
<label>
<a href="{{ route('preferences.delete-code') }}">{{ 'pref_two_factor_auth_remove_code'|_ }}</a>
{{ 'pref_two_factor_auth_remove_will_disable'|_ }}
</label>
</div>
</div>
{% endif %}
</div>
@@ -199,7 +199,6 @@
</div>
</div>
</div>
<div class="row">

View File

@@ -18,7 +18,8 @@
{% for hide in hideable %}
<li><input
{% if hide in defaultShow %}checked{% endif %}
type="checkbox" class="audit-option-checkbox" name="option[]" value="{{ hide }}" id="option_{{ hide }}" /> <label for="option_{{ hide }}" style="font-weight:normal;">{{ trans('list.'~hide) }}</label></li>
type="checkbox" class="audit-option-checkbox" name="option[]" value="{{ hide }}" id="option_{{ hide }}"/> <label
for="option_{{ hide }}" style="font-weight:normal;">{{ trans('list.'~hide) }}</label></li>
{% endfor %}
</ul>
@@ -41,13 +42,12 @@
<em>
{{ trans('firefly.no_audit_activity',
{
account_name: account.name,
url: url,
start: start.formatLocalized(monthAndDayFormat),
end: end.formatLocalized(monthAndDayFormat),
})|raw
}}
{
account_name: account.name,
url: url,
start: start.formatLocalized(monthAndDayFormat),
end: end.formatLocalized(monthAndDayFormat),
})|raw }}
</em>
</div>
{% else %}
@@ -60,8 +60,7 @@
url: url,
end: auditData[account.id].end,
balance: auditData[account.id].endBalance|formatAmount
})|raw
}}
})|raw }}
</p>
{% include 'reports/partials/journals-audit.twig' with {'journals': auditData[account.id].journals,'account':account} %}
<p style="padding:10px;">
@@ -71,8 +70,7 @@
url: url,
end: auditData[account.id].dayBefore,
balance: auditData[account.id].dayBeforeBalance|formatAmount
})|raw
}}
})|raw }}
</p>
</div>
{% endif %}

View File

@@ -62,7 +62,8 @@
<h3 class="box-title">{{ 'Asset account'|_ }}: {{ account.name }}</h3>
</div>
<div class="box-body">
<canvas id="account-chart-{{ account.id }}" class="account-chart" data-id="{{ account.id }}" style="width:100%;height:400px;" height="400"></canvas>
<canvas id="account-chart-{{ account.id }}" class="account-chart" data-id="{{ account.id }}" style="width:100%;height:400px;"
height="400"></canvas>
</div>
</div>
</div>

View File

@@ -70,25 +70,25 @@
<div class="box-body">
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>&nbsp;</th>
{% for date, header in budgets.get('headers') %}
<th>{{ header }}</th>
{% endfor %}
</tr>
<tr>
<th>&nbsp;</th>
{% for date, header in budgets.get('headers') %}
<th>{{ header }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% set spentData = budgets.get('spent') %}
{% for budgetId, budgetName in budgets.get('budgets') %}
<tr>
<th>
<a title="{{ budgetName }}" href="#" data-budget="{{ budgetId }}" class="budget-chart-activate">{{ budgetName }}</a>
</th>
{% for date, header in budgets.get('headers') %}
<td>{{ spentData[budgetId][date]|formatAmount }}</td>
{% endfor %}
<tr>
<th>
<a title="{{ budgetName }}" href="#" data-budget="{{ budgetId }}" class="budget-chart-activate">{{ budgetName }}</a>
</th>
{% for date, header in budgets.get('headers') %}
<td>{{ spentData[budgetId][date]|formatAmount }}</td>
{% endfor %}
</tr>
</tr>
{% endfor %}
</tbody>

View File

@@ -26,10 +26,10 @@
<td>
<a href="{{ route('budgets.show',balanceLine.getBudget.id) }}">{{ balanceLine.getTitle }}</a>
{% if balanceLine.getStartdate and balanceLine.getEnddate %}
<span class="small"><br>
{{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}
&mdash;
{{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}
<span class="small"><br>
{{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}
&mdash;
{{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}
</span>
{% endif %}
</td>

View File

@@ -17,7 +17,8 @@
<br/>
<small>
{{ expense.count }} {{ 'transactions'|_|lower }}
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="expense-entry" data-account-id="{{ expense.id }}"></i>
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="expense-entry"
data-account-id="{{ expense.id }}"></i>
</small>
{% endif %}
</td>

View File

@@ -17,7 +17,8 @@
<br/>
<small>
{{ income.count }} {{ 'transactions'|_|lower }}
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="income-entry" data-account-id="{{ income.id }}"></i>
<i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="income-entry"
data-account-id="{{ income.id }}"></i>
</small>
{% endif %}

View File

@@ -33,11 +33,13 @@
<tr data-date="{{ journal.date.format('Y-m-d') }}" data-id="{{ journal.id }}">
<td class="hide-buttons">
<div class="btn-group btn-group-xs">
<a href="{{ route('transactions.edit',journal.id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
<a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a></div></td>
<a href="{{ route('transactions.edit',journal.id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
<a href="{{ route('transactions.delete',journal.id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a></div>
</td>
<td class="hide-icon">{{ journal|typeIcon }}</td>
<td class="hide-description"><a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a></td>
<td class="hide-description"><a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>
</td>
<td class="hide-balance_before">{{ journal.before|formatAmount }}</td>
<td class="hide-amount">{{ journal|formatJournal }}</td>
<td class="hide-balance_after">{{ journal.after|formatAmount }}</td>

View File

@@ -44,15 +44,15 @@
class="fa fa-fw fa-trash"></i> {{ 'delete'|_ }}</a></li>
<li><a href="{{ route('rules.rule-group.select_transactions',ruleGroup.id) }}"><i
class="fa fa-fw fa-anchor"></i> {{ 'execute_on_existing_transactions_short'|_ }}</a></li>
{% if ruleGroup.order > 1 %}
<li><a href="{{ route('rules.rule-group.up',ruleGroup.id) }}"><i
class="fa fa-fw fa-arrow-up"></i> {{ 'move_rule_group_up'|_ }}</a></li>
{% endif %}
{% if ruleGroup.order < ruleGroups|length %}
<li><a href="{{ route('rules.rule-group.down',ruleGroup.id) }}"><i
class="fa fa-fw fa-arrow-down"></i> {{ 'move_rule_group_down'|_ }}
</a></li>
{% endif %}
{% if ruleGroup.order > 1 %}
<li><a href="{{ route('rules.rule-group.up',ruleGroup.id) }}"><i
class="fa fa-fw fa-arrow-up"></i> {{ 'move_rule_group_up'|_ }}</a></li>
{% endif %}
{% if ruleGroup.order < ruleGroups|length %}
<li><a href="{{ route('rules.rule-group.down',ruleGroup.id) }}"><i
class="fa fa-fw fa-arrow-down"></i> {{ 'move_rule_group_down'|_ }}
</a></li>
{% endif %}
</ul>
</div>
</div>

View File

@@ -1,22 +1,22 @@
<!-- Modal dialog to show transactions matching these triggers -->
<div class="modal fade" id="testTriggerModal" tabindex="-1" role="dialog" aria-labelledby="testTriggerLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="testTriggerLabel">{{ 'test_rule_triggers'|_ }}</h4>
</div>
<div class="modal-body">
<div class="transaction-warning alert alert-warning">
<h4><i class="icon fa fa-warning"></i> {{ 'flash_warning'|_ }}</h4>
<span class="warning-contents"></span>
</div>
<div class="transactions-list">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
</div>
</div>
</div>
</div>
<!-- Modal dialog to show transactions matching these triggers -->
<div class="modal fade" id="testTriggerModal" tabindex="-1" role="dialog" aria-labelledby="testTriggerLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="testTriggerLabel">{{ 'test_rule_triggers'|_ }}</h4>
</div>
<div class="modal-body">
<div class="transaction-warning alert alert-warning">
<h4><i class="icon fa fa-warning"></i> {{ 'flash_warning'|_ }}</h4>
<span class="warning-contents"></span>
</div>
<div class="transactions-list">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
</div>
</div>
</div>
</div>

View File

@@ -67,8 +67,8 @@
</div>
</div>
</div>
{% include '/rules/partials/test-trigger-modal.twig' %}
{% include '/rules/partials/test-trigger-modal.twig' %}
<!-- RULE ACTIONS -->
<div class="row">

View File

@@ -68,8 +68,8 @@
</div>
</div>
</div>
{% include '/rules/partials/test-trigger-modal.twig' %}
{% include '/rules/partials/test-trigger-modal.twig' %}
<!-- RULE ACTIONS -->
<div class="row">

View File

@@ -143,7 +143,8 @@
<!-- deposit has several source names -->
{% if preFilled.what == 'deposit' %}
<td>
<input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}" class="form-control"/>
<input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}"
class="form-control"/>
</td>
{% endif %}

View File

@@ -7,196 +7,197 @@
<form method="POST" action="{{ route('split.journal.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
enctype="multipart/form-data">
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="id" value="{{ journal.id }}"/>
<input type="hidden" name="what" value="{{ preFilled.what }}"/>
<input name="_token" type="hidden" value="{{ csrf_token() }}">
<input type="hidden" name="id" value="{{ journal.id }}"/>
<input type="hidden" name="what" value="{{ preFilled.what }}"/>
{% if errors.all()|length > 0 %}
{% if errors.all()|length > 0 %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">{{ 'errors'|_ }}</h3>
</div>
<div class="box-body">
<ul>
{% for key, err in errors.all() %}
<li class="text-danger">{{ err }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="box box-danger">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'errors'|_ }}</h3>
<h3 class="box-title">{{ 'transaction_meta_data'|_ }}</h3>
</div>
<div class="box-body">
<ul>
{% for key, err in errors.all() %}
<li class="text-danger">{{ err }}</li>
{% endfor %}
</ul>
{{ ExpandedForm.text('journal_description', journal.description) }}
{{ ExpandedForm.select('journal_currency_id', currencies, preFilled.transaction_currency_id) }}
{{ ExpandedForm.staticText('journal_amount', preFilled.journal_amount|formatAmount ) }}
<input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
<!-- show source if withdrawal or transfer -->
{% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
{{ ExpandedForm.select('journal_source_account_id', assetAccounts, preFilled.journal_source_account_id) }}
{% endif %}
<!-- show destination account id, if deposit (is asset): -->
{% if preFilled.what == 'deposit' %}
{{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
{% endif %}
<!-- show static destination if transfer -->
{% if preFilled.what == 'transfer' %}
{{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transaction_meta_data'|_ }}</h3>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transaction_dates'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('date', journal.date) }}
{{ ExpandedForm.date('interest_date', journal.interest_date) }}
{{ ExpandedForm.date('book_date', journal.book_date) }}
{{ ExpandedForm.date('process_date', journal.process_date) }}
</div>
</div>
<div class="box-body">
{{ ExpandedForm.text('journal_description', journal.description) }}
{{ ExpandedForm.select('journal_currency_id', currencies, preFilled.transaction_currency_id) }}
{{ ExpandedForm.staticText('journal_amount', preFilled.journal_amount|formatAmount ) }}
<input type="hidden" name="journal_amount" value="{{ preFilled.journal_amount }}"/>
<!-- show source if withdrawal or transfer -->
{% if preFilled.what == 'withdrawal' or preFilled.what == 'transfer' %}
{{ ExpandedForm.select('journal_source_account_id', assetAccounts, preFilled.journal_source_account_id) }}
{% endif %}
<!-- show destination account id, if deposit (is asset): -->
{% if preFilled.what == 'deposit' %}
{{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
{% endif %}
<!-- show static destination if transfer -->
{% if preFilled.what == 'transfer' %}
{{ ExpandedForm.select('journal_destination_account_id', assetAccounts, preFilled.journal_destination_account_id) }}
{% endif %}
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'transaction_dates'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.date('date', journal.date) }}
<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">{{ 'splits'|_ }}</h3>
</div>
<div class="box-body">
<table class="table table-bordered table-condensed table-striped split-table">
<thead>
<tr>
<th>{{ trans('list.split_number') }}</th>
<th>{{ trans('list.description') }}</th>
{{ ExpandedForm.date('interest_date', journal.interest_date) }}
{{ ExpandedForm.date('book_date', journal.book_date) }}
{{ ExpandedForm.date('process_date', journal.process_date) }}
</div>
</div>
</div>
</div>
<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">{{ 'splits'|_ }}</h3>
</div>
<div class="box-body">
<table class="table table-bordered table-condensed table-striped split-table">
<thead>
<tr>
<th>{{ trans('list.split_number') }}</th>
<th>{{ trans('list.description') }}</th>
<!-- withdrawal and deposit have a destination. -->
{% if preFilled.what == 'withdrawal' %}
<th>{{ trans('list.destination') }}</th>
{% endif %}
{% if preFilled.what == 'deposit' %}
<th>{{ trans('list.source') }}</th>
{% endif %}
<th>{{ trans('list.amount') }}</th>
<!-- only withdrawal has budget -->
{% if preFilled.what == 'withdrawal' %}
<th>{{ trans('list.budget') }}</th>
{% endif %}
<th>{{ trans('list.category') }}</th>
</tr>
</thead>
<tbody>
{% for index, descr in preFilled.description %}
<tr class="{% if loop.index == 1 %}initial-row{% else %}not-initial-row{% endif %}">
<td class="count">#{{ loop.index }}</td>
<td>
<input type="text" name="description[]" value="{{ descr }}" class="form-control"/>
</td>
<!-- withdrawal has several destination names. -->
<!-- withdrawal and deposit have a destination. -->
{% if preFilled.what == 'withdrawal' %}
<td>
<input type="text" name="destination_account_name[]" value="{{ preFilled.destination_account_name[index] }}"
class="form-control"/>
</td>
<th>{{ trans('list.destination') }}</th>
{% endif %}
<!-- deposit has several source names -->
{% if preFilled.what == 'deposit' %}
<td>
<input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}" class="form-control"/>
</td>
<th>{{ trans('list.source') }}</th>
{% endif %}
<th>{{ trans('list.amount') }}</th>
<td style="width:10%;">
<input type="number" name="amount[]" value="{{ preFilled.amount[index] }}"
class="form-control" autocomplete="off" step="any" min="0.01">
</td>
<!-- only withdrawal has budget -->
{% if preFilled.what == 'withdrawal' %}
<td>
<select class="form-control" name="budget_id[]">
{% for key, budget in budgets %}
<option label="{{ budget }}" value="{{ key }}"
{% if preFilled.budget_id[index] == key %}
selected="selected"
{% endif %}
>{{ budget }}</option>
{% endfor %}
</select>
</td>
<th>{{ trans('list.budget') }}</th>
{% endif %}
<td>
<input type="text" name="category[]" value="{{ preFilled.category[index] }}" class="form-control"/>
</td>
<th>{{ trans('list.category') }}</th>
</tr>
{% endfor %}
</tbody>
</table>
<p>
<br/>
<a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
</p>
<!--<p class="pull-right">
</thead>
<tbody>
{% for index, descr in preFilled.description %}
<tr class="{% if loop.index == 1 %}initial-row{% else %}not-initial-row{% endif %}">
<td class="count">#{{ loop.index }}</td>
<td>
<input type="text" name="description[]" value="{{ descr }}" class="form-control"/>
</td>
<!-- withdrawal has several destination names. -->
{% if preFilled.what == 'withdrawal' %}
<td>
<input type="text" name="destination_account_name[]" value="{{ preFilled.destination_account_name[index] }}"
class="form-control"/>
</td>
{% endif %}
<!-- deposit has several source names -->
{% if preFilled.what == 'deposit' %}
<td>
<input type="text" name="source_account_name[]" value="{{ preFilled.source_account_name[index] }}"
class="form-control"/>
</td>
{% endif %}
<td style="width:10%;">
<input type="number" name="amount[]" value="{{ preFilled.amount[index] }}"
class="form-control" autocomplete="off" step="any" min="0.01">
</td>
{% if preFilled.what == 'withdrawal' %}
<td>
<select class="form-control" name="budget_id[]">
{% for key, budget in budgets %}
<option label="{{ budget }}" value="{{ key }}"
{% if preFilled.budget_id[index] == key %}
selected="selected"
{% endif %}
>{{ budget }}</option>
{% endfor %}
</select>
</td>
{% endif %}
<td>
<input type="text" name="category[]" value="{{ preFilled.category[index] }}" class="form-control"/>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<p>
<br/>
<a href="#" class="btn btn-default btn-do-split"><i class="fa fa-plus-circle"></i> {{ 'add_another_split'|_ }}</a>
</p>
<!--<p class="pull-right">
<button type="submit" id="transaction-btn" class="btn btn-success pull-right">
{{ ('update_splitted_'~preFilled.what)|_ }}
</button>
</p>
-->
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
</div>
<div class="box-body">
<!-- ATTACHMENTS -->
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
</div>
<div class="box-body">
<!-- ATTACHMENTS -->
{{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
</div>
<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','split-transaction') }}
</div>
<div class="box-footer">
<button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ preFilled.what)|_ }}</button>
</div>
</div>
</div>
</div>
<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','split-transaction') }}
</div>
<div class="box-footer">
<button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ preFilled.what)|_ }}</button>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

View File

@@ -39,7 +39,7 @@
{% endif %}
<p>
{{ 'sum'|_ }}: {{ sum|formatAmount }}<br />
{{ 'sum'|_ }}: {{ sum|formatAmount }}<br/>
</p>
</div>

View File

@@ -67,7 +67,6 @@
{% endif %}
<!-- CATEGORY ALWAYS -->
{{ ExpandedForm.text('category') }}

View File

@@ -13,16 +13,16 @@
<input type="hidden" name="what" value="{{ what }}"/>
{% if errors.all|length > 0 %}
<div class="row">
<div class="col-lg-12">
<h3 class="text-danger">{{ 'errors'|_ }}</h3>
<ul>
{% for err in errors.all %}
<li class="text-danger">{{ err }}</li>
{% endfor %}
</ul>
<div class="row">
<div class="col-lg-12">
<h3 class="text-danger">{{ 'errors'|_ }}</h3>
<ul>
{% for err in errors.all %}
<li class="text-danger">{{ err }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
@@ -88,7 +88,6 @@
{{ ExpandedForm.date('process_date',data['process_date']) }}
<!-- TAGS -->
{{ ExpandedForm.text('tags') }}

View File

@@ -36,7 +36,7 @@
{% for journal in journals %}
<tr>
<td>
<input type="checkbox" name="confirm_mass_delete[]" value="{{ journal.id }}" checked />
<input type="checkbox" name="confirm_mass_delete[]" value="{{ journal.id }}" checked/>
</td>
<td>
<a href="{{ route('transactions.show',journal.id) }}" title="{{ journal.description }}">{{ journal.description }}</a>

View File

@@ -158,46 +158,46 @@
{% endif %}
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
{% for t in transactions %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ t.account.name }}</h3>
</div>
<table class="table table-bordered table-striped">
<tr>
<td style="width:30%;">{{ 'account'|_ }}</td>
<td><a href="{{ route('accounts.show',t.account.id) }}">{{ t.account.name }}</a></td>
</tr>
<tr>
<td>{{ 'account_type'|_ }}</td>
<td>{{ t.account.accounttype.type|_ }}</td>
</tr>
<tr>
<td>{{ 'balance'|_ }}</td>
<td>{{ t.before|formatAmount }} &rarr; {{ (t.before+t.amount)|formatAmount }}</td>
</tr>
{% if t.description %}
<tr>
<td>{{ trans('form.description') }}</td>
<td>{{ t.description }}</td>
</tr>
{% endif %}
<tr>
<td>{{ 'category'|_ }}</td>
<td>
{{ transactionCategories(t)|raw }}
</td>
</tr>
<tr>
<td>{{ 'budget'|_ }}</td>
<td>
{{ transactionBudgets(t)|raw }}
</td>
</tr>
</table>
{% for t in transactions %}
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ t.account.name }}</h3>
</div>
{% endfor %}
<table class="table table-bordered table-striped">
<tr>
<td style="width:30%;">{{ 'account'|_ }}</td>
<td><a href="{{ route('accounts.show',t.account.id) }}">{{ t.account.name }}</a></td>
</tr>
<tr>
<td>{{ 'account_type'|_ }}</td>
<td>{{ t.account.accounttype.type|_ }}</td>
</tr>
<tr>
<td>{{ 'balance'|_ }}</td>
<td>{{ t.before|formatAmount }} &rarr; {{ (t.before+t.amount)|formatAmount }}</td>
</tr>
{% if t.description %}
<tr>
<td>{{ trans('form.description') }}</td>
<td>{{ t.description }}</td>
</tr>
{% endif %}
<tr>
<td>{{ 'category'|_ }}</td>
<td>
{{ transactionCategories(t)|raw }}
</td>
</tr>
<tr>
<td>{{ 'budget'|_ }}</td>
<td>
{{ transactionBudgets(t)|raw }}
</td>
</tr>
</table>
</div>
{% endfor %}
</div>
</div>
{% endblock %}