mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 11:06:36 +00:00
Add Sub feature flag FEATURE_FLAG_RECIPES_MEALPLAN (#2118)
* Update routes.php Added sub feature FEATURE_FLAG_RECIPES_MEALPLAN * Update default.blade.php Added sub feature flag FEATURE_FLAG_RECIPES_MEALPLAN * Update SystemController.php Added Sub feature flags FEATURE_FLAG_RECIPES_MEALPLAN * Update config-dist.php Sub feature flags FEATURE_FLAG_RECIPES_MEALPLAN * Update routes.php TYPO * Code formatting / structure --------- Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
committed by
GitHub
parent
1e9a4d9590
commit
902cb20710
@@ -140,6 +140,7 @@ Setting('FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING', true);
|
|||||||
Setting('FEATURE_FLAG_STOCK_PRODUCT_FREEZING', true);
|
Setting('FEATURE_FLAG_STOCK_PRODUCT_FREEZING', true);
|
||||||
Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD', true); // Activate the number pad in due date fields on (supported) mobile browsers
|
Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD', true); // Activate the number pad in due date fields on (supported) mobile browsers
|
||||||
Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true);
|
Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true);
|
||||||
|
Setting('FEATURE_FLAG_RECIPES_MEALPLAN', true);
|
||||||
Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true);
|
Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true);
|
||||||
Setting('FEATURE_FLAG_THERMAL_PRINTER', false);
|
Setting('FEATURE_FLAG_THERMAL_PRINTER', false);
|
||||||
|
|
||||||
|
@@ -102,7 +102,7 @@ class SystemController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Meal Plan
|
// Meal Plan
|
||||||
if ($entryPage === 'mealplan' && constant('GROCY_FEATURE_FLAG_RECIPES'))
|
if ($entryPage === 'mealplan' && constant('GROCY_FEATURE_FLAG_RECIPES_MEALPLAN'))
|
||||||
{
|
{
|
||||||
return '/mealplan';
|
return '/mealplan';
|
||||||
}
|
}
|
||||||
|
10
routes.php
10
routes.php
@@ -87,11 +87,15 @@ $app->group('', function (RouteCollectorProxy $group) {
|
|||||||
$group->get('/recipes', '\Grocy\Controllers\RecipesController:Overview');
|
$group->get('/recipes', '\Grocy\Controllers\RecipesController:Overview');
|
||||||
$group->get('/recipe/{recipeId}', '\Grocy\Controllers\RecipesController:RecipeEditForm');
|
$group->get('/recipe/{recipeId}', '\Grocy\Controllers\RecipesController:RecipeEditForm');
|
||||||
$group->get('/recipe/{recipeId}/pos/{recipePosId}', '\Grocy\Controllers\RecipesController:RecipePosEditForm');
|
$group->get('/recipe/{recipeId}/pos/{recipePosId}', '\Grocy\Controllers\RecipesController:RecipePosEditForm');
|
||||||
$group->get('/mealplan', '\Grocy\Controllers\RecipesController:MealPlan');
|
|
||||||
$group->get('/mealplansections', '\Grocy\Controllers\RecipesController:MealPlanSectionsList');
|
|
||||||
$group->get('/mealplansection/{sectionId}', '\Grocy\Controllers\RecipesController:MealPlanSectionEditForm');
|
|
||||||
$group->get('/recipessettings', '\Grocy\Controllers\RecipesController:RecipesSettings');
|
$group->get('/recipessettings', '\Grocy\Controllers\RecipesController:RecipesSettings');
|
||||||
$group->get('/recipe/{recipeId}/grocycode', '\Grocy\Controllers\RecipesController:RecipeGrocycodeImage');
|
$group->get('/recipe/{recipeId}/grocycode', '\Grocy\Controllers\RecipesController:RecipeGrocycodeImage');
|
||||||
|
|
||||||
|
if (GROCY_FEATURE_FLAG_RECIPES_MEALPLAN)
|
||||||
|
{
|
||||||
|
$group->get('/mealplan', '\Grocy\Controllers\RecipesController:MealPlan');
|
||||||
|
$group->get('/mealplansections', '\Grocy\Controllers\RecipesController:MealPlanSectionsList');
|
||||||
|
$group->get('/mealplansection/{sectionId}', '\Grocy\Controllers\RecipesController:MealPlanSectionEditForm');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chore routes
|
// Chore routes
|
||||||
|
@@ -188,6 +188,7 @@
|
|||||||
<span class="nav-link-text">{{ $__t('Recipes') }}</span>
|
<span class="nav-link-text">{{ $__t('Recipes') }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@if(GROCY_FEATURE_FLAG_RECIPES_MEALPLAN)
|
||||||
<li class="nav-item nav-item-sidebar permission-RECIPES_MEALPLAN"
|
<li class="nav-item nav-item-sidebar permission-RECIPES_MEALPLAN"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
data-placement="right"
|
data-placement="right"
|
||||||
@@ -201,6 +202,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
@endif
|
||||||
@if(GROCY_FEATURE_FLAG_CHORES)
|
@if(GROCY_FEATURE_FLAG_CHORES)
|
||||||
<div class="nav-item-divider"></div>
|
<div class="nav-item-divider"></div>
|
||||||
<li class="nav-item nav-item-sidebar"
|
<li class="nav-item nav-item-sidebar"
|
||||||
|
Reference in New Issue
Block a user