Various cosmetic fixes for /all lists [skip ci]

This commit is contained in:
James Cole 2017-04-16 12:51:21 +02:00
parent f0dab5bdb9
commit 20a30a2d1d
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
10 changed files with 146 additions and 122 deletions

View File

@ -402,7 +402,7 @@ class CategoryController extends Controller
// count journals without budget in this period:
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
$collector->setAllAssetAccounts()->setRange($end, $currentEnd)->withoutCategory()->withOpposingAccount();
$collector->setAllAssetAccounts()->setRange($end, $currentEnd)->withoutCategory()->withOpposingAccount()->disableInternalFilter();
$count = $collector->getJournals()->count();
// amount transferred

View File

@ -274,6 +274,7 @@ Breadcrumbs::register(
'budgets.show', function (BreadCrumbGenerator $breadcrumbs, Budget $budget) {
$breadcrumbs->parent('budgets.index');
$breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
$breadcrumbs->push(trans('firefly.everything'), route('budgets.show', [$budget->id]));
}
);
@ -723,9 +724,19 @@ Breadcrumbs::register(
Breadcrumbs::register(
'tags.show', function (BreadCrumbGenerator $breadcrumbs, Tag $tag) {
'tags.show', function (BreadCrumbGenerator $breadcrumbs, Tag $tag, string $moment, Carbon $start, Carbon $end) {
$breadcrumbs->parent('tags.index');
$breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id]));
$breadcrumbs->push(e($tag->tag), route('tags.show', [$tag->id], $moment));
if ($moment === 'all') {
$breadcrumbs->push(trans('firefly.everything'), route('tags.show', [$tag->id], $moment));
}
if($moment !== '') {
$title = trans(
'firefly.between_dates_breadcrumb', ['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
);
$breadcrumbs->push($title, route('tags.show', [$tag->id], $moment));
}
}
);

View File

@ -131,9 +131,11 @@ return [
'all_transfers' => 'All transfers',
'title_transfers_between' => 'All transfers between :start and :end',
'all_transfer' => 'All transfers',
'all_journals_for_tag' => 'All transactions for tag ":tag"',
'title_transfer_between' => 'All transfers between :start and :end',
'all_journals_for_category' => 'All transactions for category :name',
'journals_in_period_for_category' => 'All transactions for category :name between :start and :end',
'journals_in_period_for_tag' => 'All transactions for tag :tag between :start and :end',
'not_available_demo_user' => 'The feature you try to access is not available to demo users.',
'exchange_rate_instructions' => 'Asset account "@name" only accepts transactions in @native_currency. If you wish to use @foreign_currency instead, make sure that the amount in @native_currency is known as well:',
'transfer_exchange_rate_instructions' => 'Source asset account "@source_name" only accepts transactions in @source_currency. Destination asset account "@dest_name" only accepts transactions in @dest_currency. You must provide the transferred amount correctly in both currencies.',

View File

@ -104,7 +104,7 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for period in periods %}
{% if (period.spent != 0 or period.earned != 0) or (accountType == 'Asset account') %}
{% if (period.spent != 0 or period.earned != 0) %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('accounts.show',[account.id,period.string]) }}">{{ period.name }}</a>

View File

@ -41,24 +41,26 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for period in periods %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('budgets.no-budget',[period.string]) }}">{{ period.name }}</a>
</h3>
{% if period.count > 0 %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('budgets.no-budget',[period.string]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
</table>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
</table>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}

View File

@ -44,6 +44,14 @@
</div>
<div class="box-body">
{% include 'list.journals-tasker' with {hideBudgets:true, hideBills:true} %}
{% if budgetLimit %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('budgets.show', [budget.id]) }}">
{{ 'show_all_no_filter'|_ }}
</a>
</p>
{% endif %}
</div>
</div>
</div>

View File

@ -41,32 +41,40 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for period in periods %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('categories.no-category',[period.string]) }}">{{ period.name }}</a>
</h3>
{% if period.count > 0 %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('categories.no-category',[period.string]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
{% if period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if period.earned != 0 %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if period.transferred != 0 %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
</table>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}

View File

@ -73,7 +73,7 @@
</div>
<div class="box-body">
{% include 'list.journals-tasker' with {hideCategories: true} %}
{% if entries %}
{% if periods %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('categories.show', [category.id,'all']) }}">
@ -94,34 +94,42 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">
{% for period in periods %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('categories.show',[category.id,period.string]) }}">{{ period.name }}</a>
</h3>
{% if period.spent != 0 or period.earned != 0 or period.sum != 0 %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('categories.show',[category.id,period.string]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
{% if period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if period.earned != 0 %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if period.earned != 0 and period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
{% endif %}
{% if period.transferred != 0 %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% if period.earned != 0 and period.spent != 0 %}
<tr>
<td style="width:33%;">{{ 'sum'|_ }}</td>
<td style="text-align: right;">{{ period.sum|formatAmount }}</td>
</tr>
{% endif %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
</table>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}

View File

@ -102,23 +102,6 @@
</div>
</div>
<div class="box-body">
{% if periods %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('tags.show', [tag.id,'all']) }}">
{{ 'show_all_no_filter'|_ }}
</a>
</p>
{% else %}
<p>
<i class="fa fa-calendar" aria-hidden="true"></i>
<a href="{{ route('tags.show', [tag.id]) }}">
{{ 'show_the_current_period_and_overview'|_ }}
</a>
</p>
{% endif %}
{% include 'list/journals-tasker' %}
{% if periods %}

View File

@ -41,38 +41,40 @@
{% if periods.count > 0 %}
<div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
{% for period in periods %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('transactions.index',[what, period.string]) }}">{{ period.name }}</a>
</h3>
{% if period.count > 0 %}
<div class="box {% if period.date == start %}box-solid box-primary{% endif %}">
<div class="box-header with-border">
<h3 class="box-title"><a href="{{ route('transactions.index',[what, period.string]) }}">{{ period.name }}</a>
</h3>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
{% if what == 'withdrawal' %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'deposit' %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'transfers' or what == 'transfer' %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
<div class="box-body no-padding">
<table class="table table-hover">
<tr>
<td style="width:33%;">{{ 'transactions'|_ }}</td>
<td style="text-align: right;">{{ period.count }}</td>
</tr>
{% if what == 'withdrawal' %}
<tr>
<td style="width:33%;">{{ 'spent'|_ }}</td>
<td style="text-align: right;">{{ period.spent|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'deposit' %}
<tr>
<td style="width:33%;">{{ 'earned'|_ }}</td>
<td style="text-align: right;">{{ period.earned|formatAmount }}</td>
</tr>
{% endif %}
{% if what == 'transfers' or what == 'transfer' %}
<tr>
<td style="width:33%;">{{ 'transferred'|_ }}</td>
<td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}