diff --git a/admin/app/components/solidus_admin/orders/index/component.html.erb b/admin/app/components/solidus_admin/orders/index/component.html.erb index e423137d3e3..19617576018 100644 --- a/admin/app/components/solidus_admin/orders/index/component.html.erb +++ b/admin/app/components/solidus_admin/orders/index/component.html.erb @@ -19,7 +19,8 @@ id: 'orders-list', model_class: Spree::Order, rows: @page.records, - fade_row_proc: fade_row_proc, + row_fade: row_fade, + row_url: ->(order) { spree.edit_admin_order_path(order) }, search_key: SolidusAdmin::Config[:order_search_key], search_url: solidus_admin.orders_path, batch_actions: batch_actions, diff --git a/admin/app/components/solidus_admin/orders/index/component.rb b/admin/app/components/solidus_admin/orders/index/component.rb index 9cdaaad7eda..b24952b846e 100644 --- a/admin/app/components/solidus_admin/orders/index/component.rb +++ b/admin/app/components/solidus_admin/orders/index/component.rb @@ -5,7 +5,7 @@ def initialize(page:) @page = page end - class_attribute :fade_row_proc, default: ->(order) { order.paid? && order.shipped? } + class_attribute :row_fade, default: ->(order) { order.paid? && order.shipped? } def title Spree::Order.model_name.human.pluralize @@ -105,12 +105,10 @@ def number_column { header: :order, data: ->(order) do - order_path = spree.edit_admin_order_path(order) - - if !fade_row_proc.call(order) - link_to order.number, order_path, class: 'font-semibold' + if !row_fade.call(order) + content_tag :div, order.number, class: 'font-semibold' else - link_to order.number, order_path + content_tag :div, order.number end end } diff --git a/admin/app/components/solidus_admin/products/index/component.html.erb b/admin/app/components/solidus_admin/products/index/component.html.erb index d017f15316e..31310639e31 100644 --- a/admin/app/components/solidus_admin/products/index/component.html.erb +++ b/admin/app/components/solidus_admin/products/index/component.html.erb @@ -19,6 +19,7 @@ id: 'products-list', model_class: Spree::Product, rows: @page.records, + row_url: ->(product) { solidus_admin.product_path(product) }, search_key: SolidusAdmin::Config[:product_search_key], search_url: solidus_admin.products_path, batch_actions: batch_actions, diff --git a/admin/app/components/solidus_admin/products/index/component.rb b/admin/app/components/solidus_admin/products/index/component.rb index 87b9c0b7d49..b72e4ef13c3 100644 --- a/admin/app/components/solidus_admin/products/index/component.rb +++ b/admin/app/components/solidus_admin/products/index/component.rb @@ -74,11 +74,11 @@ def image_column data: ->(product) do image = product.gallery.images.first or return - link_to( - render(component('ui/thumbnail').new(src: image.url(:small), alt: product.name)), - solidus_admin.product_path(product), - class: 'inline-flex overflow-hidden', - tabindex: -1, + render( + component('ui/thumbnail').new( + src: image.url(:small), + alt: product.name + ) ) end } @@ -88,7 +88,7 @@ def name_column { header: :name, data: ->(product) do - link_to product.name, solidus_admin.product_path(product) + content_tag :div, product.name end } end diff --git a/admin/app/components/solidus_admin/ui/table/component.html.erb b/admin/app/components/solidus_admin/ui/table/component.html.erb index 6f1b78dfb74..df6f1474c89 100644 --- a/admin/app/components/solidus_admin/ui/table/component.html.erb +++ b/admin/app/components/solidus_admin/ui/table/component.html.erb @@ -116,8 +116,9 @@
<% @rows.each do |row| %>