mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Better view for accounts and I fixed a html error.
This commit is contained in:
@@ -248,7 +248,7 @@ class AccountController extends Controller
|
||||
// generate entries for each period (and cache those)
|
||||
$entries = $this->periodEntries($account);
|
||||
|
||||
return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
return view('accounts.show', compact('account', 'entries', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -274,7 +274,8 @@ class AccountController extends Controller
|
||||
$start = $repository->oldestJournalDate($account);
|
||||
$end = $repository->newestJournalDate($account);
|
||||
|
||||
return view('accounts.show-by-date', compact('account', 'journals', 'subTitle', 'start', 'end','chartUri'));
|
||||
// same call, except "entries".
|
||||
return view('accounts.show', compact('account', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -300,7 +301,8 @@ class AccountController extends Controller
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('accounts/show/' . $account->id . '/' . $date);
|
||||
|
||||
return view('accounts.show-by-date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end','chartUri'));
|
||||
// same call, except "entries".
|
||||
return view('accounts.show', compact('account', 'subTitleIcon', 'journals', 'subTitle', 'start', 'end', 'chartUri'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,30 +67,34 @@ Breadcrumbs::register(
|
||||
|
||||
Breadcrumbs::register(
|
||||
'accounts.show', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
|
||||
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$what = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
|
||||
$breadcrumbs->parent('accounts.index', $what);
|
||||
$breadcrumbs->push(e($account->name), route('accounts.show', [$account->id]));
|
||||
$breadcrumbs->push($account->name, route('accounts.show', [$account->id]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'accounts.show.date', function (BreadCrumbGenerator $breadcrumbs, Account $account, Carbon $date) {
|
||||
'accounts.show.date', function (BreadCrumbGenerator $breadcrumbs, Account $account, Carbon $start, Carbon $end) {
|
||||
|
||||
$startString = $start->formatLocalized(strval(trans('config.month_and_day')));
|
||||
$endString = $end->formatLocalized(strval(trans('config.month_and_day')));
|
||||
$title = sprintf('%s (%s)', $account->name, trans('firefly.from_to', ['start' => $startString, 'end' => $endString]));
|
||||
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
$title = $account->name . ' (' . Navigation::periodShow($date, $range) . ')';
|
||||
|
||||
$breadcrumbs->push($title, route('accounts.show.date', [$account->id, $date->format('Y-m-d')]));
|
||||
$breadcrumbs->push($title, route('accounts.show.date', [$account->id, $start->format('Y-m-d')]));
|
||||
}
|
||||
);
|
||||
|
||||
Breadcrumbs::register(
|
||||
'accounts.show.all', function (BreadCrumbGenerator $breadcrumbs, Account $account) {
|
||||
'accounts.show.all', function (BreadCrumbGenerator $breadcrumbs, Account $account, Carbon $start, Carbon $end) {
|
||||
|
||||
$startString = $start->formatLocalized(strval(trans('config.month_and_day')));
|
||||
$endString = $end->formatLocalized(strval(trans('config.month_and_day')));
|
||||
$title = sprintf('%s (%s)', $account->name, trans('firefly.from_to', ['start' => $startString, 'end' => $endString]));
|
||||
|
||||
$breadcrumbs->parent('accounts.show', $account);
|
||||
|
||||
$title = sprintf('%s (%s)', $account->name, strtolower(trans('firefly.everything')));
|
||||
|
||||
$breadcrumbs->push($title, route('accounts.show.all', [$account->id]));
|
||||
$breadcrumbs->push($title, route('accounts.show.all', [$account->id, $start->format('Y-m-d')]));
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user