From 2c478f1d8e79f90b20c6d4fce920b5345b29b03e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 19 Sep 2023 14:26:14 +0200 Subject: [PATCH] Link to product/variant edit page --- app/views/admin/products_v3/_table.html.haml | 2 ++ config/locales/en.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/admin/products_v3/_table.html.haml b/app/views/admin/products_v3/_table.html.haml index b8a8deae5c..ba404e519d 100644 --- a/app/views/admin/products_v3/_table.html.haml +++ b/app/views/admin/products_v3/_table.html.haml @@ -61,6 +61,7 @@ %td.align-left .line-clamp-1= product.inherits_properties ? 'YES' : 'NO' #TODO: consider using https://github.com/RST-J/human_attribute_values, else use I18n.t (also below) %td.align-right + = link_to t('admin.products_page.actions.edit'), edit_admin_product_path(product) - product.variants.each do |variant| - prefix = "[products][][variants_attributes][]" # Couldn't convince the formbuilder to generate this for me, so for now we manually add the prefix = form.fields_for(variant) do |variant_form| @@ -85,3 +86,4 @@ %td.align-left -# empty %td.align-right + = link_to t('admin.products_page.actions.edit'), edit_admin_product_variant_path(product, variant) diff --git a/config/locales/en.yml b/config/locales/en.yml index e4146d2085..63d1c9d2cd 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -562,6 +562,8 @@ en: tax_category: "Tax Category" inherits_properties: "Inherits Properties?" import_date: "Import Date" + actions: + edit: Edit adjustments: skipped_changing_canceled_order: "You can't change a cancelled order." # Common properties / models