Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update views and translations.
James Cole54b76a03ce8d
diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex 29daa784c0..847f9162ca 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -37,6 +37,7 @@ return ['cancel' => 'Cancel','from' => 'From','to' => 'To',+ 'help_translating' => 'This help text is not yet available in your language. <a href="https://crowdin.com/project/firefly-iii-help">Will you help translate?</a>','showEverything' => 'Show everything','never' => 'Never','no_results_for_empty_search' => 'Your search was empty, so nothing was found.',diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twigindex b702c942e1..8e13be1ad7 100644--- a/resources/views/accounts/show.twig+++ b/resources/views/accounts/show.twig@@ -96,7 +96,11 @@{% else %}{% set showReconcile = false %}{% endif %}- {% include 'list.journals' with {sorting:true, hideBills:true, hideBudgets: true, hideCategories: true, showReconcile: showReconcile} %}+ {% if periods.count > 0 %}+ {% include 'list.transactions' with {sorting:true, showReconcile: showReconcile} %}+ {% else %}+ {% include 'list.transactions' with {sorting:true, showReconcile: showReconcile, showCategories: true, showBudgets: true, showBill:true} %}+ {% endif %}<p><i class="fa fa-calendar"></i>{% if periods.count > 0 %}diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twigindex f22355adb5..571fe05780 100644--- a/resources/views/bills/show.twig+++ b/resources/views/bills/show.twig@@ -164,7 +164,7 @@<h3 class="box-title">{{ 'connected_journals'|_ }}</h3></div><div class="box-body">- {% include 'list.journals' %}+ {% include 'list.transactions' with {showCategories: true, showBudgets: true} %}</div></div></div>diff --git a/resources/views/budgets/no-budget.twig b/resources/views/budgets/no-budget.twigindex 36680089d5..632f6f1368 100644--- a/resources/views/budgets/no-budget.twig+++ b/resources/views/budgets/no-budget.twig@@ -22,13 +22,15 @@<h3 class="box-title">{{ subTitle }}</h3></div><div class="box-body ">- {% include 'list.journals' with {'journals': journals,'hideBudgets': true} %}+{% if periods.count > 0 %}+ {% include 'list.transactions' %}<p><i class="fa fa-calendar"></i><a href="{{ route('budgets.no-budget-all') }}">{{ 'show_all_no_filter'|_ }}</a></p>{% else %}+ {% include 'list.transactions' with {showCategories:true, showBill:true} %}<p><i class="fa fa-calendar"></i><a href="{{ route('budgets.no-budget') }}">{{ 'show_the_current_period_and_overview'|_ }}</a>diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twigindex 8fdc7a414e..e40e0ed0cc 100644--- a/resources/views/budgets/show.twig+++ b/resources/views/budgets/show.twig@@ -89,7 +89,11 @@<h3 class="box-title">{{ 'transactions'|_ }}</h3></div><div class="box-body">- {% include 'list.journals' with {hideBudgets:true, hideBills:true} %}+ {% if budgetLimit %}+ {% include 'list.transactions' %}+ {% else %}+ {% include 'list.transactions' with {showCategories: true} %}+ {% endif %}{% if budgetLimit %}<p><i class="fa fa-calendar"></i>diff --git a/resources/views/categories/no-category.twig b/resources/views/categories/no-category.twigindex ed6778c54a..ca2dc081a8 100644--- a/resources/views/categories/no-category.twig+++ b/resources/views/categories/no-category.twig@@ -22,13 +22,15 @@<h3 class="box-title">{{ subTitle }}</h3></div><div class="box-body ">- {% include 'list.journals' with {'journals': journals, 'hideCategories':true} %}+{% if periods.count > 0 %}+ {% include 'list.transactions' %}<p><i class="fa fa-calendar"></i><a href="{{ route('categories.no-category.all') }}">{{ 'show_all_no_filter'|_ }}</a></p>{% else %}+ {% include 'list.transactions' with {showBudgets:true, showBill:true} %}<p><i class="fa fa-calendar"></i><a href="{{ route('categories.no-category') }}">{{ 'show_the_current_period_and_overview'|_ }}</a>diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twigindex dc79577173..09d6992601 100644--- a/resources/views/categories/show.twig+++ b/resources/views/categories/show.twig@@ -65,8 +65,8 @@<h3 class="box-title">{{ 'transactions'|_ }}</h3></div><div class="box-body">- {% include 'list.journals' with {hideCategories: true, hideBills: true} %}{% if periods.count > 0 %}+ {% include 'list.transactions' %}<p><i class="fa fa-calendar"></i><a href="{{ route('categories.show.all', [category.id]) }}">@@ -74,6 +74,7 @@</a></p>{% else %}+ {% include 'list.transactions' with {showBudgets:true, showBill:true} %}<p><i class="fa fa-calendar"></i><a href="{{ route('categories.show', [category.id]) }}">diff --git a/resources/views/list/journals.twig b/resources/views/list/journals.twigindex 2aa70cc42e..fa2440e856 100644--- a/resources/views/list/journals.twig+++ b/resources/views/list/journals.twig@@ -28,7 +28,7 @@</thead><tbody>{% for transaction in transactions %}- {% include 'partials.transaction-row' %}+ {% include 'partials.journal-row' %}{% endfor %}</tbody></table>diff --git a/resources/views/list/transactions.twig b/resources/views/list/transactions.twignew file mode 100644index 0000000000..f83f1cefb7--- /dev/null+++ b/resources/views/list/transactions.twig@@ -0,0 +1,79 @@+{# render pagination #}+{{ transactions.render|raw }}++<table class="table table-hover table-condensed {% if sorting %}sortable-table{% endif %}">+ <thead>+ <tr class="ignore">+ <th class="hidden-xs no_select_boxes" colspan="2"> </th>+ <th class="hidden-xs select_boxes" colspan="2" style="display: none;"><input name="select_all" class="select_all" type="checkbox"/></th>+ <th>{{ trans('list.description') }}</th>+ <th style="text-align:right;">{{ trans('list.amount') }}</th>+ <th class="hidden-xs hidden-sm">{{ trans('list.date') }}</th>+ <th class="hidden-xs hidden-sm hidden-md">{{ trans('list.from') }}</th>+ <th class="hidden-xs hidden-sm hidden-md">{{ trans('list.to') }}</th>++ {# Only show budgets when asked in some way #}+ {% if showBudgets %}+ <th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th>+ {% endif %}++ {# Only show categories when asked in some way #}+ {% if showCategories %}+ <th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th>+ {% endif %}++ {# Only show bill when asked in some way #}+ {% if showBill %}+ <th class="hidden-xs"><i class="fa fa-fw fa-calendar-o" title="{{ trans('list.bill') }}"></i></th>+ {% endif %}+ </tr>+ </thead>+ <tbody>+ {% for transaction in transactions %}+ {% include 'partials.transaction-row' %}+ {% endfor %}+ </tbody>+</table>+<div class="row mass_edit_all hidden-xs" style="display: none;padding:8px;">+ <div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">+ <div class="btn-group dropup mass_button_options" style="display:none;">+ <button type="button" class="btn btn-default">{{ 'actions'|_ }}</button>+ <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">+ <span class="caret"></span>+ <span class="sr-only">Toggle Dropdown</span>+ </button>+ <ul class="dropdown-menu">+ <li><a href="#" class="mass_edit"><i class="fa fa-fw fa-pencil"></i> <span>{{ 'edit'|_ }}</span></a></li>+ <li><a href="#" class="bulk_edit"><i class="fa fa-fw fa-pencil-square-o"></i> <span>{{ 'bulk_edit'|_ }}</span></a></li>+ <li><a href="#" class="mass_delete"><i class="fa fa-fw fa-trash"></i> <span>{{ 'delete'|_ }}</span></a></li>+ </ul>+ </div>+ </div>+ <div class="col-lg-4 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>+ <a href="#" class="btn btn-default mass_stop_select" style="display:none;"><i class="fa faw-fw fa-square-o"+ ></i> {{ 'stop_selection'|_ }}</a>++ {% if showReconcile == true %}+ {% if Route.getCurrentRoute.getName =='accounts.show.all' %}+ <a href="{{ route('accounts.reconcile', [account.id, start.format('Ymd')]) }}" class="btn btn-info mass_reconcile"><i+ class="fa fa-fw fa-check"></i> {{ 'reconcile_this_account'|_ }}</a>+ {% else %}+ <a href="{{ route('accounts.reconcile', [account.id, start.format('Ymd'), end.format('Ymd')]) }}" class="btn btn-info mass_reconcile"><i+ class="fa fa-fw fa-check"></i> {{ 'reconcile_this_account'|_ }}</a>+ {% endif %}+ {% endif %}+ </div>+ </div>+</div>+<div class="row" style="padding:8px;">+ <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">+ {{ transactions.render|raw }}+ </div>+</div>+<script type="text/javascript">+ var edit_selected_txt = "{{ trans('firefly.edit')|escape('js') }}";+ var edit_bulk_selected_txt = "{{ trans('firefly.bulk_edit')|escape('js') }}";+ var delete_selected_txt = "{{ trans('firefly.delete')|escape('js') }}";+</script>diff --git a/resources/views/partials/journal-row.twig b/resources/views/partials/journal-row.twignew file mode 100644index 0000000000..9f392268ee--- /dev/null+++ b/resources/views/partials/journal-row.twig@@ -0,0 +1,70 @@+<tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}"+ data-transaction-id="{{ transaction.id }}"+>+ {# input buttons #}+ <td class="hidden-xs">+ <div class="select_single" style="display:none;">+ <input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}"+ type="checkbox"/>+ </div>+ <div class="btn-group btn-group-xs edit_buttons edit_tr_buttons">{% if sorting %}<a href="#" class="handle btn btn-default btn-xs"><i+ class="fa fa-fw fa-arrows-v"></i></a>{% endif %}<a href="{{ route('transactions.edit',transaction.journal_id) }}"+ class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a><a+ href="{{ route('transactions.delete',transaction.journal_id) }}" class="btn btn-xs btn-danger"><i+ class="fa fa-fw fa-trash-o"></i></a></div>+ </td>++ {# icon #}+ <td class="hidden-xs">+ {{ transaction|transactionIcon }}+ </td>++ {# description #}+ <td>+ {# is reconciled? #}+ {{ transaction|transactionReconciled }}++ <a href="{{ route('transactions.show',transaction.journal_id) }}">+ {{ transaction|transactionDescription }}+ </a>+ {# is a split journal #}+ {{ transaction|transactionIsSplit }}++ {# count attachments #}+ {{ transaction|transactionHasAtt }}+++ </td>++ <td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>+ <td class="hidden-sm hidden-xs">+ {{ transaction.date.formatLocalized(monthAndDayFormat) }}+ </td>++ <td class="hidden-xs hidden-sm hidden-md">+ {{ transaction|transactionSourceAccount }}+ </td>++ <td class="hidden-xs hidden-sm hidden-md">+ {{ transaction|transactionDestinationAccount }}+ </td>++ {% if not hideBudgets %}+ <td class="hidden-xs">+ {{ transaction|transactionBudgets }}+ </td>+ {% endif %}++ {% if not hideCategories %}+ <td class="hidden-xs">+ {{ transaction|transactionCategories }}+ </td>+ {% endif %}+ {% if not hideBills %}+ <td class="hidden-xs">+ {% if transaction.bill_id %}+ <a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>+ {% endif %}+ </td>+ {% endif %}+</tr>diff --git a/resources/views/partials/transaction-row.twig b/resources/views/partials/transaction-row.twigindex 9f392268ee..dd31b6c44c 100644--- a/resources/views/partials/transaction-row.twig+++ b/resources/views/partials/transaction-row.twig@@ -1,17 +1,11 @@-<tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}"- data-transaction-id="{{ transaction.id }}"->+<tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}" data-transaction-id="{{ transaction.id }}">+{# input buttons #}<td class="hidden-xs"><div class="select_single" style="display:none;">- <input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}"- type="checkbox"/>+ <input name="select_all_single[]" class="select_all_single" data-transaction="{{ transaction.id }}" value="{{ transaction.journal_id }}" type="checkbox"/></div>- <div class="btn-group btn-group-xs edit_buttons edit_tr_buttons">{% if sorting %}<a href="#" class="handle btn btn-default btn-xs"><i- class="fa fa-fw fa-arrows-v"></i></a>{% endif %}<a href="{{ route('transactions.edit',transaction.journal_id) }}"- class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a><a- href="{{ route('transactions.delete',transaction.journal_id) }}" class="btn btn-xs btn-danger"><i- class="fa fa-fw fa-trash-o"></i></a></div>+ <div class="btn-group btn-group-xs edit_buttons edit_tr_buttons">{% if sorting %}<a href="#" class="handle btn btn-default btn-xs"><i class="fa fa-fw fa-arrows-v"></i></a>{% endif %}<a href="{{ route('transactions.edit',transaction.journal_id) }}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a><a href="{{ route('transactions.delete',transaction.journal_id) }}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a></div></td>{# icon #}@@ -36,31 +30,39 @@</td>+ {# amount #}<td style="text-align: right;"><span style="margin-right:5px;">{{ transaction|transactionAmount }}</span></td>++ {# date #}<td class="hidden-sm hidden-xs">{{ transaction.date.formatLocalized(monthAndDayFormat) }}</td>+ {# source #}<td class="hidden-xs hidden-sm hidden-md">{{ transaction|transactionSourceAccount }}</td>-+ {# dest #}<td class="hidden-xs hidden-sm hidden-md">{{ transaction|transactionDestinationAccount }}</td>- {% if not hideBudgets %}+ {# budget, if opted to show. #}+ {% if showBudgets %}<td class="hidden-xs">{{ transaction|transactionBudgets }}</td>{% endif %}- {% if not hideCategories %}+ {# category, if opted to show. #}+ {% if showCategories %}<td class="hidden-xs">{{ transaction|transactionCategories }}</td>{% endif %}- {% if not hideBills %}++ {# bill, if opted to show#}+ {% if showBill %}<td class="hidden-xs">{% if transaction.bill_id %}<a href="{{ route('bills.show',transaction.bill_id) }}">{{ transaction.bill_name }}</a>diff --git a/resources/views/recurring/show.twig b/resources/views/recurring/show.twigindex b4cbf3875e..3d2438ba06 100644--- a/resources/views/recurring/show.twig+++ b/resources/views/recurring/show.twig@@ -198,7 +198,7 @@</h3></div><div class="box-body">- {% include 'list.journals' with {sorting:false, hideBills:true, hideBudgets: true, showReconcile: false} %}+ {% include 'list.transactions' with {showBudgets:true, showCategories:true} %}</div></div></div>diff --git a/resources/views/transactions/index.twig b/resources/views/transactions/index.twigindex daeeed551f..5a55f2d527 100644--- a/resources/views/transactions/index.twig+++ b/resources/views/transactions/index.twig@@ -31,7 +31,12 @@{% endif %}</div>{# actual list #}- {% include 'list.journals' with {'journals': journals} %}+ {% if periods.count > 0 %}+ {# page is not "all"-overview#}+ {% include 'list.transactions' %}+ {% else %}+ {% include 'list.transactions' with {showCategories: true, showBudgets: true, showBill:true} %}+ {% endif %}</div><div class="box-footer">{# links for other views #}