From 700db9ae0002ba2c49e194e7ff3409ca37e850c2 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 5 Oct 2019 13:10:56 +0200 Subject: [PATCH] Added a new sub feature flag FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS --- changelog/54_UNRELEASED_2019-xx-xx.md | 3 +++ config-dist.php | 1 + views/shoppinglist.blade.php | 2 ++ views/shoppinglistitemform.blade.php | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/changelog/54_UNRELEASED_2019-xx-xx.md b/changelog/54_UNRELEASED_2019-xx-xx.md index e55edefd..005d58c4 100644 --- a/changelog/54_UNRELEASED_2019-xx-xx.md +++ b/changelog/54_UNRELEASED_2019-xx-xx.md @@ -4,6 +4,9 @@ ### Recipe fixes - Fixed that recipes were displayed without ingredients if the total recipe count was > 100 +### Shopping list improvements +- Added a new sub feature flag `FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS` to disable multiple shopping lists if you only need one (defaults to `true`, so no changed behavior when not configured) + ### Chores improvements - Added a new period type "yearly" (for yearly schedules) - Added a "period interval" option per chore to have more flexible schedules (possible for the daily/weekly/monthly/yearly schedules, means "schedule this chore only every x days/weeks/months" to have for example biweekly schedules) diff --git a/config-dist.php b/config-dist.php index c83286bb..9df72f0b 100644 --- a/config-dist.php +++ b/config-dist.php @@ -124,6 +124,7 @@ Setting('FEATURE_FLAG_STOCK_PRICE_TRACKING', true); Setting('FEATURE_FLAG_STOCK_LOCATION_TRACKING', true); Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING', true); Setting('FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING', true); +Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true); Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true); diff --git a/views/shoppinglist.blade.php b/views/shoppinglist.blade.php index 2bfc049f..706ed3af 100644 --- a/views/shoppinglist.blade.php +++ b/views/shoppinglist.blade.php @@ -16,6 +16,7 @@ @endpush @section('content') +@if(GROCY_FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS)
@@ -44,6 +45,7 @@
-->
+@endif
diff --git a/views/shoppinglistitemform.blade.php b/views/shoppinglistitemform.blade.php index c6d7ea40..12a060a4 100644 --- a/views/shoppinglistitemform.blade.php +++ b/views/shoppinglistitemform.blade.php @@ -21,6 +21,7 @@
+ @if(GROCY_FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS)
+ @else + + @endif @php if($mode == 'edit') { $productId = $listItem->product_id; } else { $productId = ''; } @endphp @include('components.productpicker', array(