mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
De-deface product tabs
We do not include stock management from v2 because we will use the variants edit page to manage on_hand and on_demand
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
/ insert_bottom "[data-hook='admin_product_tabs']"
|
||||
|
||||
- klass = current == 'Product Distributions' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t('admin.products.product_distributions'), product_distributions_admin_product_url(@product)
|
||||
@@ -1,5 +0,0 @@
|
||||
/ insert_bottom "[data-hook='admin_product_tabs']"
|
||||
|
||||
- klass = current == 'Group Buy Options' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t('admin.products.group_buy_options'), group_buy_options_admin_product_url(@product)
|
||||
@@ -1,5 +0,0 @@
|
||||
/ insert_bottom "[data-hook='admin_product_tabs']"
|
||||
|
||||
- klass = current == t(:Search) ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t(:Search), seo_admin_product_url(@product)
|
||||
36
app/views/spree/admin/shared/_product_tabs.html.haml
Normal file
36
app/views/spree/admin/shared/_product_tabs.html.haml
Normal file
@@ -0,0 +1,36 @@
|
||||
= content_for :page_title do
|
||||
= Spree.t(:editing_product)
|
||||
= "\"#{@product.name}\""
|
||||
|
||||
= content_for :sidebar_title do
|
||||
%span.sku
|
||||
= @product.sku
|
||||
|
||||
= content_for :sidebar do
|
||||
%nav.menu
|
||||
%ul
|
||||
- if can?(:admin, Spree::Product)
|
||||
- klass = current == 'Product Details' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-edit', Spree.t(:product_details), edit_admin_product_url(@product)
|
||||
- if can?(:admin, Spree::Image)
|
||||
- klass = current == 'Images' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-picture', Spree.t(:images), admin_product_images_url(@product)
|
||||
- if can?(:admin, Spree::Variant)
|
||||
- klass = current == 'Variants' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-th-large', Spree.t(:variants), admin_product_variants_url(@product)
|
||||
- if can?(:admin, Spree::ProductProperty)
|
||||
- klass = current == 'Product Properties' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', Spree.t(:product_properties), admin_product_product_properties_url(@product)
|
||||
- klass = current == 'Product Distributions' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t('admin.products.product_distributions'), product_distributions_admin_product_url(@product)
|
||||
- klass = current == 'Group Buy Options' ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t('admin.products.group_buy_options'), group_buy_options_admin_product_url(@product)
|
||||
- klass = current == t(:Search) ? 'active' : ''
|
||||
%li{:class => klass}
|
||||
= link_to_with_icon 'icon-tasks', t(:Search), seo_admin_product_url(@product)
|
||||
Reference in New Issue
Block a user