mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Update version and API.
This commit is contained in:
@@ -118,9 +118,9 @@ class IndexController extends Controller
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Foundation\Application|Factory|View
|
||||
*/
|
||||
public function emptyIndex()
|
||||
public function emptyIndex(?string $objectType = null)
|
||||
{
|
||||
return view('accounts.empty-index');
|
||||
return view('accounts.empty-index', compact('objectType'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,6 +133,11 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function index(Request $request, string $objectType)
|
||||
{
|
||||
// temp catch for layout.
|
||||
if ('v2' === config('firefly.layout')) {
|
||||
return $this->emptyIndex($objectType);
|
||||
}
|
||||
|
||||
$objectType = $objectType ?? 'asset';
|
||||
$subTitle = (string) trans(sprintf('firefly.%s_accounts', $objectType));
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType));
|
||||
|
@@ -75,6 +75,7 @@ class ShowController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Show an account.
|
||||
*
|
||||
@@ -89,6 +90,13 @@ class ShowController extends Controller
|
||||
*/
|
||||
public function show(Request $request, Account $account, Carbon $start = null, Carbon $end = null)
|
||||
{
|
||||
$objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type));
|
||||
|
||||
// temp catch for layout.
|
||||
if ('v2' === config('firefly.layout')) {
|
||||
return view('accounts.empty-index', compact('objectType'));
|
||||
}
|
||||
|
||||
if (!$this->isEditableAccount($account)) {
|
||||
return $this->redirectAccountToAccount($account); // @codeCoverageIgnore
|
||||
}
|
||||
@@ -103,7 +111,6 @@ class ShowController extends Controller
|
||||
}
|
||||
$location = $this->repository->getLocation($account);
|
||||
$attachments = $this->repository->getAttachments($account);
|
||||
$objectType = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type));
|
||||
$today = new Carbon;
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type));
|
||||
$page = (int) $request->get('page');
|
||||
|
Reference in New Issue
Block a user