mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Renaming 'Variant Overrides' index page to 'Inventory'
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
/ replace_contents "title"
|
||||
|
||||
= t(controller.controller_name, :default => controller.controller_name.titleize)
|
||||
= " - OFN #{t(:administration)}"
|
||||
- if content_for? :html_title
|
||||
= yield :html_title
|
||||
- else
|
||||
= t(controller.controller_name, :default => controller.controller_name.titleize)
|
||||
= " - OFN #{t(:administration)}"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/ insert_bottom "[data-hook='admin_product_sub_tabs']"
|
||||
|
||||
= tab :variant_overrides, label: "Overrides", url: main_app.admin_variant_overrides_path, match_path: '/variant_overrides'
|
||||
= tab :variant_overrides, label: "Inventory", url: main_app.admin_inventory_path, match_path: '/inventory'
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
.alpha.eleven.columns
|
||||
You can opt to use your
|
||||
%strong
|
||||
%a{href: main_app.admin_variant_overrides_path } inventory
|
||||
%a{href: main_app.admin_inventory_path } inventory
|
||||
to restrict the list of products that are available to add to your shop in the Order Cycle interface. To enable this functionality, select 'Inventory Only' below.
|
||||
.row
|
||||
.alpha.eleven.columns
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
- content_for :html_title do
|
||||
= t("admin.inventory.title")
|
||||
|
||||
- content_for :page_title do
|
||||
Override Product Details
|
||||
%h1.page-title= t("admin.inventory.title")
|
||||
%a.with-tip{ 'data-powertip' => "#{t("admin.inventory.description")}" }=t('admin.whats_this')
|
||||
|
||||
= render :partial => 'spree/admin/shared/product_sub_menu'
|
||||
|
||||
@@ -72,7 +72,11 @@ en:
|
||||
actions: Actions
|
||||
viewing: "Viewing: %{current_view_name}"
|
||||
|
||||
whats_this: What's this?
|
||||
|
||||
inventory:
|
||||
title: Inventory
|
||||
description: Use this page to manage inventories for your enterprises. Any product details set here will override those set on the 'Products' page
|
||||
sku: SKU
|
||||
price: Price
|
||||
on_hand: On Hand
|
||||
|
||||
@@ -104,6 +104,8 @@ Openfoodnetwork::Application.routes.draw do
|
||||
get :move_down
|
||||
end
|
||||
|
||||
get '/inventory', to: 'variant_overrides#index'
|
||||
|
||||
resources :variant_overrides do
|
||||
post :bulk_update, on: :collection
|
||||
post :bulk_reset, on: :collection
|
||||
|
||||
@@ -22,7 +22,7 @@ feature %q{
|
||||
|
||||
describe "selecting a hub" do
|
||||
it "displays a list of hub choices" do
|
||||
visit '/admin/variant_overrides'
|
||||
visit '/admin/inventory'
|
||||
|
||||
page.should have_select2 'hub_id', options: ['', hub.name, hub2.name]
|
||||
end
|
||||
@@ -51,7 +51,7 @@ feature %q{
|
||||
|
||||
context "when a hub is selected" do
|
||||
before do
|
||||
visit '/admin/variant_overrides'
|
||||
visit '/admin/inventory'
|
||||
select2_select hub.name, from: 'hub_id'
|
||||
end
|
||||
|
||||
@@ -216,7 +216,7 @@ feature %q{
|
||||
let!(:inventory_item3) { create(:inventory_item, enterprise: hub, variant: variant3) }
|
||||
|
||||
before do
|
||||
visit '/admin/variant_overrides'
|
||||
visit '/admin/inventory'
|
||||
select2_select hub.name, from: 'hub_id'
|
||||
end
|
||||
|
||||
@@ -305,7 +305,7 @@ feature %q{
|
||||
|
||||
context "when a hub is selected" do
|
||||
before do
|
||||
visit '/admin/variant_overrides'
|
||||
visit '/admin/inventory'
|
||||
select2_select hub.name, from: 'hub_id'
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user