From 99205e435cd3fd8c7bbf07e36d754e59e348f626 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 10 Oct 2023 22:09:26 +1100 Subject: [PATCH] Show only the new products page in the menu When the feature toggle is enabled, we don't want to see the old products page. It's a bit broken and causes confusion. But we still want to be able to access it by the URL for now. --- app/views/spree/admin/shared/_product_sub_menu.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/spree/admin/shared/_product_sub_menu.html.haml b/app/views/spree/admin/shared/_product_sub_menu.html.haml index 1215f1a02d..771366f57a 100644 --- a/app/views/spree/admin/shared/_product_sub_menu.html.haml +++ b/app/views/spree/admin/shared/_product_sub_menu.html.haml @@ -1,8 +1,9 @@ - content_for :sub_menu do %ul#sub_nav.inline-menu - = tab :products + - if feature?(:admin_style_v3, spree_current_user) + = tab :products_v3, url: main_app.admin_products_v3_index_path + - else + = tab :products = tab :properties = tab :variant_overrides, url: main_app.admin_inventory_path, match_path: '/inventory' = tab :import, url: main_app.admin_product_import_path, match_path: '/product_import' - - if feature?(:admin_style_v3, spree_current_user) - = tab :products_v3, url: main_app.admin_products_v3_index_path