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
|
# set this to true
|
||||||
Setting('DISABLE_URL_REWRITING', false);
|
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
|
# Default user settings
|
||||||
# These settings can be changed per user, here the defaults
|
# These settings can be changed per user, here the defaults
|
||||||
|
@ -41,21 +41,24 @@ class SystemController extends BaseController
|
|||||||
|
|
||||||
private function GetEntryPageRelative()
|
private function GetEntryPageRelative()
|
||||||
{
|
{
|
||||||
$entryPage = '/stockoverview';
|
switch (GROCY_ENTRY_PAGE) {
|
||||||
|
default:
|
||||||
if (!GROCY_FEATURE_FLAG_STOCK)
|
case 'stock':
|
||||||
{
|
return '/stockoverview';
|
||||||
$entryPage = '/choresoverview';
|
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';
|
||||||
}
|
}
|
||||||
if (!GROCY_FEATURE_FLAG_CHORES)
|
|
||||||
{
|
|
||||||
$entryPage = '/batteriesoverview';
|
|
||||||
}
|
|
||||||
if (!GROCY_FEATURE_FLAG_BATTERIES)
|
|
||||||
{
|
|
||||||
$entryPage = '/equipment';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $entryPage;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user