mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Allow possibility to choose custom homepage
This commit is contained in:
parent
511c95070e
commit
86f5667039
@ -41,8 +41,9 @@ Setting('STOCK_BARCODE_LOOKUP_PLUGIN', 'DemoBarcodeLookupPlugin');
|
||||
# set this to true
|
||||
Setting('DISABLE_URL_REWRITING', false);
|
||||
|
||||
|
||||
|
||||
# By default the homepage will be set to the stock overview.
|
||||
# You can set this to any overview you want. Example: Use recipes to set the homepage to the recipes overview.
|
||||
Setting('ENTRY_PAGE', 'stock');
|
||||
|
||||
# Default user settings
|
||||
# These settings can be changed per user, here the defaults
|
||||
|
@ -41,21 +41,24 @@ class SystemController extends BaseController
|
||||
|
||||
private function GetEntryPageRelative()
|
||||
{
|
||||
$entryPage = '/stockoverview';
|
||||
|
||||
if (!GROCY_FEATURE_FLAG_STOCK)
|
||||
{
|
||||
$entryPage = '/choresoverview';
|
||||
}
|
||||
if (!GROCY_FEATURE_FLAG_CHORES)
|
||||
{
|
||||
$entryPage = '/batteriesoverview';
|
||||
}
|
||||
if (!GROCY_FEATURE_FLAG_BATTERIES)
|
||||
{
|
||||
$entryPage = '/equipment';
|
||||
}
|
||||
|
||||
return $entryPage;
|
||||
switch (GROCY_ENTRY_PAGE) {
|
||||
default:
|
||||
case 'stock':
|
||||
return '/stockoverview';
|
||||
case 'shoppinglist':
|
||||
return '/shoppinglist';
|
||||
case 'recipes':
|
||||
return '/recipes';
|
||||
case 'chores':
|
||||
return '/choresoverview';
|
||||
case 'tasks':
|
||||
return '/tasks';
|
||||
case 'batteries':
|
||||
return '/batteriesoverview';
|
||||
case 'equipment':
|
||||
return '/equipment';
|
||||
case 'calendar':
|
||||
return '/calendar';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user