mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
Add new products page
Hidden behind admin_style_v3 feature toggle.
This commit is contained in:
7
app/controllers/admin/products_v3_controller.rb
Normal file
7
app/controllers/admin/products_v3_controller.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class ProductsV3Controller < Spree::Admin::BaseController
|
||||
def index; end
|
||||
end
|
||||
end
|
||||
9
app/views/admin/products_v3/index.html.haml
Normal file
9
app/views/admin/products_v3/index.html.haml
Normal 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'
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user