Update breadcrumb #1078

This commit is contained in:
James Cole 2017-12-30 12:43:57 +01:00
parent 3cc1bf52cb
commit ec2f693575
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 19 additions and 1 deletions

View File

@ -44,7 +44,6 @@
</td>
<td>
{{ journal|journalTotalAmount }}
</td>
<td>
{{ journal.date.formatLocalized(monthAndDayFormat) }}

View File

@ -990,6 +990,25 @@ Breadcrumbs::register(
}
);
// BULK EDIT
Breadcrumbs::register(
'transactions.bulk.edit',
function (BreadCrumbsGenerator $breadcrumbs, Collection $journals): void {
if ($journals->count() > 0) {
$journalIds = $journals->pluck('id')->toArray();
$what = strtolower($journals->first()->transactionType->type);
$breadcrumbs->parent('transactions.index', $what, '(nothing)', new Carbon, new Carbon);
$breadcrumbs->push(trans('firefly.mass_bulk_journals'), route('transactions.bulk.edit', $journalIds));
return;
}
$breadcrumbs->parent('index');
return;
}
);
// SPLIT
Breadcrumbs::register(
'transactions.split.edit',