Add new products page

Hidden behind admin_style_v3 feature toggle.
This commit is contained in:
David Cook
2023-06-23 15:37:30 +10:00
parent efcaab5deb
commit 841192fb96
4 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
module Admin
class ProductsV3Controller < Spree::Admin::BaseController
def index; end
end
end

View File

@@ -0,0 +1,9 @@
- content_for :page_title do
= t('.header.title')
- content_for :page_actions do
%div{ :class => "toolbar" }
%ul{ :class => "actions header-action-links inline-menu" }
%li#new_product_link
= button_link_to t(:new_product), "/admin/products/new", { :icon => 'icon-plus', :id => 'admin_new_product' }
= render partial: 'spree/admin/shared/product_sub_menu'

View File

@@ -764,7 +764,10 @@ en:
images: "Images"
variants: "Variants"
product_properties: "Product Properties"
products_v3:
index:
header:
title: Bulk Edit Products
product_import:
title: Product Import
file_not_found: File not found or could not be opened

View File

@@ -72,6 +72,9 @@ Openfoodnetwork::Application.routes.draw do
constraints FeatureToggleConstraint.new(:new_products_page) do
get '/new_products', to: 'products#index'
end
constraints FeatureToggleConstraint.new(:admin_style_v3) do
get '/products_v3', to: 'products_v3#index'
end
resources :variant_overrides do
post :bulk_update, on: :collection