Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Clean up code, fixes #392
James Cole49cc8a97a369
diff --git a/resources/views/admin/users/index.twig b/resources/views/admin/users/index.twigindex 602c4dba48..cbe5832e92 100644--- a/resources/views/admin/users/index.twig+++ b/resources/views/admin/users/index.twig@@ -14,47 +14,47 @@<table class="table table-condensed sortable"><thead><tr>- <th colspan="2"> </th>+ <th class="hidden-xs" colspan="2"> </th><th>{{ trans('list.email') }}</th>- <th>{{ trans('list.registered_at') }}</th>- <th>{{ trans('list.registered_from') }}</th>- <th>{{ trans('list.confirmed_from') }}</th>- <th>{{ trans('list.is_admin') }}</th>- <th>{{ trans('list.has_two_factor') }}</th>+ <th class="hidden-xs">{{ trans('list.registered_at') }}</th>+ <th class="hidden-xs">{{ trans('list.registered_from') }}</th>+ <th class="hidden-xs">{{ trans('list.confirmed_from') }}</th>+ <th class="hidden-xs">{{ trans('list.is_admin') }}</th>+ <th class="hidden-xs">{{ trans('list.has_two_factor') }}</th><th>{{ trans('list.is_activated') }}</th><th>{{ trans('list.is_blocked') }}</th>- <th>{{ trans('list.blocked_code') }}</th>+ <th class="hidden-xs">{{ trans('list.blocked_code') }}</th></tr></thead><tbody>{% for user in users %}<tr>- <td data-value="{{ user.id }}">+ <td class="hidden-xs" data-value="{{ user.id }}"><div class="btn-group btn-group-xs"><a class="btn btn-default" href="{{ route('admin.users.edit',user.id) }}"><i class="fa fa-pencil"></i></a></div></td>- <td data-value="{{ user.id }}">#{{ user.id }}</td>+ <td class="hidden-xs" data-value="{{ user.id }}">#{{ user.id }}</td><td data-value="{{ user.email }}"><a href="{{ route('admin.users.show',user.id) }}">{{ user.email }}</a></td>- <td data-value="{{ user.created_at.format('Y-m-d-H-i-s') }}">+ <td class="hidden-xs" data-value="{{ user.created_at.format('Y-m-d-H-i-s') }}">{{ user.created_at.formatLocalized(monthAndDayFormat) }}{{ user.created_at.format('H:i') }}</td>- <td>+ <td class="hidden-xs">{{ Preferences.getForUser(user,"registration_ip_address").data }}</td>- <td>+ <td class="hidden-xs">{{ Preferences.getForUser(user,"confirmation_ip_address").data }}</td>- <td data-value="{% if user.isAdmin %}1{% else %}0{% endif %}">+ <td class="hidden-xs" data-value="{% if user.isAdmin %}1{% else %}0{% endif %}">{% if user.isAdmin %}<small class="text-success"><i class="fa fa-fw fa-check"></i></small>{% else %}<small class="text-danger"><i class="fa fa-fw fa-times"></i></small>{% endif %}</td>- <td data-value="{% if user.has2FA %}1{% else %}0{% endif %}">+ <td class="hidden-xs" data-value="{% if user.has2FA %}1{% else %}0{% endif %}">{% if user.has2FA %}<small class="text-success"><i class="fa fa-fw fa-check"></i></small>{% else %}@@ -75,7 +75,7 @@<small class="text-success"><i class="fa fa-fw fa-times" title="{{ 'no'|_ }}"></i></small>{% endif %}</td>- <td>+ <td class="hidden-xs"><small>{% if user.blocked == 1 %}{% if user.blocked_code == "" %}diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twigindex 5730340721..e2ea0f42a8 100644--- a/resources/views/bills/show.twig+++ b/resources/views/bills/show.twig@@ -105,7 +105,7 @@<div class="box-header with-border"><h3 class="box-title">{{ 'connected_journals'|_ }}</h3></div>- <div class="box-body table-responsive no-padding">+ <div class="box-body">{% include 'list.journals-tasker' %}</div></div>diff --git a/resources/views/list/journals-tasker.twig b/resources/views/list/journals-tasker.twigindex 1af28d1a5d..daa673cfb9 100644--- a/resources/views/list/journals-tasker.twig+++ b/resources/views/list/journals-tasker.twig@@ -113,14 +113,14 @@{% endfor %}</tbody></table>-<div class="row mass_edit_all" style="display: none;">+<div class="row mass_edit_all hidden-xs" style="display: none;"><div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"><div class="mass_button_options btn-group btn-group" style="display:none;"><a href="#" class="btn btn-default mass_edit"><i class="fa fa-fw fa-pencil"></i> <span>{{ 'edit_selected'|_ }}</span></a><a href="#" class="btn btn-danger mass_delete"><i class="fa fa-fw fa-trash"></i> <span>{{ 'delete_selected'|_ }}</span></a></div></div>- <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">+ <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 hidden-xs"><div class="mass_buttons btn-group btn-group pull-right"><a href="#" class="btn btn-default mass_select"><i class="fa fa-fw fa-check-square-o"></i> {{ 'select_transactions'|_ }}</a>diff --git a/resources/views/reports/index.twig b/resources/views/reports/index.twigindex 4877fffc62..0531cd5775 100644--- a/resources/views/reports/index.twig+++ b/resources/views/reports/index.twig@@ -8,7 +8,7 @@<div class="row"><form class="form-horizontal" id="report-form" action="{{ route('reports.index') }}" method="post">- <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">+ <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">{{ 'reports'|_ }}</h3>@@ -109,7 +109,7 @@</form>- <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">+ <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">{{ 'quick_link_reports'|_ }}</h3>diff --git a/resources/views/reports/partials/accounts.twig b/resources/views/reports/partials/accounts.twigindex f05872ed1f..cbdeaa68f5 100644--- a/resources/views/reports/partials/accounts.twig+++ b/resources/views/reports/partials/accounts.twig@@ -2,8 +2,8 @@<thead><tr><th>{{ 'name'|_ }}</th>- <th>{{ 'balanceStart'|_ }}</th>- <th>{{ 'balanceEnd'|_ }}</th>+ <th class="hidden-xs">{{ 'balanceStart'|_ }}</th>+ <th class="hidden-xs">{{ 'balanceEnd'|_ }}</th><th>{{ 'difference'|_ }}</th></tr></thead>@@ -13,8 +13,8 @@<td><a href="{{ route('accounts.show',account.id) }}" title="{{ account.name }}">{{ account.name }}</a></td>- <td data-value="{{ account.startBalance }}">{{ account.startBalance|formatAmount }}</td>- <td data-value="{{ account.endBalance }}">{{ account.endBalance|formatAmount }}</td>+ <td class="hidden-xs" data-value="{{ account.startBalance }}">{{ account.startBalance|formatAmount }}</td>+ <td class="hidden-xs" data-value="{{ account.endBalance }}">{{ account.endBalance|formatAmount }}</td><td data-value="{{ (account.endBalance - account.startBalance) }}">{{ (account.endBalance - account.startBalance)|formatAmount }}</td></tr>{% endfor %}@@ -22,8 +22,8 @@<tfoot><tr><td><em>{{ 'sumOfSums'|_ }}</em></td>- <td>{{ accountReport.getStart|formatAmount }}</td>- <td>{{ accountReport.getEnd|formatAmount }}</td>+ <td class="hidden-xs">{{ accountReport.getStart|formatAmount }}</td>+ <td class="hidden-xs">{{ accountReport.getEnd|formatAmount }}</td><td>{{ accountReport.getDifference|formatAmount }}</td></tr></tfoot>diff --git a/resources/views/reports/partials/balance.twig b/resources/views/reports/partials/balance.twigindex b88029ac69..58fdf45cfc 100644--- a/resources/views/reports/partials/balance.twig+++ b/resources/views/reports/partials/balance.twig@@ -4,7 +4,7 @@<tr><th colspan="2">{{ 'budgets'|_ }}</th>{% for account in balance.getBalanceHeader.getAccounts %}- <th><a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a></th>+ <th class="hidden-xs"><a href="{{ route('accounts.show',account.id) }}">{{ account.name }}</a></th>{% endfor %}<th>{{ 'leftInBudget'|_ }}@@ -21,7 +21,7 @@<td><a href="{{ route('budgets.show',balanceLine.getBudget.id) }}">{{ balanceLine.getTitle }}</a>{% if balanceLine.getStartdate and balanceLine.getEnddate %}- <span class="small"><br>+ <span class="small" class="hidden-xs"><br>{{ balanceLine.getStartdate.formatLocalized(monthAndDayFormat) }}—{{ balanceLine.getEnddate.formatLocalized(monthAndDayFormat) }}@@ -40,7 +40,7 @@{% endif %}{% for balanceEntry in balanceLine.getBalanceEntries %}- <td>+ <td class="hidden-xs">{% if balanceEntry.getSpent != 0 %}<span class="text-danger">{{ (balanceEntry.getSpent)|formatAmountPlain }}</span><i class="fa fa-fw text-muted fa-info-circle firefly-info-button" data-location="balance-amount"diff --git a/resources/views/reports/partials/bills.twig b/resources/views/reports/partials/bills.twigindex c097c7545a..22c84668f3 100644--- a/resources/views/reports/partials/bills.twig+++ b/resources/views/reports/partials/bills.twig@@ -7,8 +7,8 @@<thead><tr><th>{{ trans('form.name') }}</th>- <th>{{ trans('form.amount_min') }}</th>- <th>{{ trans('form.amount_max') }}</th>+ <th class="hidden-xs">{{ trans('form.amount_min') }}</th>+ <th class="hidden-xs">{{ trans('form.amount_max') }}</th><th>{{ trans('form.amount') }}</th><th>{{ trans('form.under') }}</th></tr>@@ -19,8 +19,8 @@<td data-value="{{ line.getBill.name }}"><a href="{{ route('bills.show',line.getBill.id) }}">{{ line.getBill.name }}</a></td>- <td data-value="{{ line.getMin }}">{{ line.getMin|formatAmount }}</td>- <td data-value="{{ line.getMax }}">{{ line.getMax|formatAmount }}</td>+ <td class="hidden-xs" data-value="{{ line.getMin }}">{{ line.getMin|formatAmount }}</td>+ <td class="hidden-xs" data-value="{{ line.getMax }}">{{ line.getMax|formatAmount }}</td>{% if line.isHit %}<td data-value="{{ line.getAmount }}"><a href="{{ route('transactions.show', line.getTransactionJournalId) }}">diff --git a/resources/views/reports/partials/budgets.twig b/resources/views/reports/partials/budgets.twigindex 24880e9e46..d43978699e 100644--- a/resources/views/reports/partials/budgets.twig+++ b/resources/views/reports/partials/budgets.twig@@ -2,7 +2,7 @@<thead><tr><th>{{ 'budget'|_ }}</th>- <th>{{ 'date'|_ }}</th>+ <th class="hidden-xs">{{ 'date'|_ }}</th><th>{{ 'budgeted'|_ }}</th><th>{{ 'spent'|_ }}</th><th>{{ 'left'|_ }}</th>@@ -19,7 +19,7 @@<em>{{ 'no_budget'|_ }}</em>{% endif %}</td>- <td>+ <td class="hidden-xs">{% if budgetLine.getRepetition.id %}<a href="{{ route('budgets.showWithRepetition', [budgetLine.getBudget.id, budgetLine.getRepetition.id]) }}">{{ budgetLine.getRepetition.startdate.formatLocalized(monthAndDayFormat) }}@@ -62,7 +62,8 @@</tbody><tfoot><tr>- <td colspan="2"><em>{{ 'sum'|_ }}</em></td>+ <td><em>{{ 'sum'|_ }}</em></td>+ <td class="hidden-xs"> </td><td>{{ budgets.getBudgeted|formatAmount }}</td><td>{% if budgets.getSpent != 0 %}diff --git a/resources/views/rules/index.twig b/resources/views/rules/index.twigindex 803575e88a..86e530da0f 100644--- a/resources/views/rules/index.twig+++ b/resources/views/rules/index.twig@@ -68,8 +68,8 @@<thead><tr><th colspan="2">{{ 'rule_name'|_ }}</th>- <th>{{ 'rule_triggers'|_ }}</th>- <th>{{ 'rule_actions'|_ }}</th>+ <th class="hidden-xs">{{ 'rule_triggers'|_ }}</th>+ <th class="hidden-xs">{{ 'rule_actions'|_ }}</th></tr></thead><tbody>@@ -123,7 +123,7 @@{% endif %}{% if rule.description != "" %}- <small+ <small class="hidden-xs"{% if not rule.active %}class="text-muted"{% endif %}@@ -131,7 +131,7 @@{% endif %}</td>- <td>+ <td class="hidden-xs">{% if rule.ruleTriggers.count > 0 %}<ul class="small rule-triggers" data-id="{{ rule.id }}">{% for trigger in rule.ruleTriggers %}@@ -151,7 +151,7 @@</ul>{% endif %}</td>- <td>+ <td class="hidden-xs">{% if rule.ruleActions.count > 0 %}<ul class="small rule-actions" data-id="{{ rule.id }}">{% for action in rule.ruleActions %}