Update views and translations.

This commit is contained in:
James Cole 2018-08-11 19:22:28 +02:00
parent cd6c727730
commit 54b76a03ce
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
13 changed files with 193 additions and 23 deletions

View File

@ -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.',

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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]) }}">

View File

@ -28,7 +28,7 @@
</thead>
<tbody>
{% for transaction in transactions %}
{% include 'partials.transaction-row' %}
{% include 'partials.journal-row' %}
{% endfor %}
</tbody>
</table>

View File

@ -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">&nbsp;</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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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 #}