Apply ship shortcut override

This commit is contained in:
Matt-Yorkley
2018-09-11 11:43:38 +01:00
parent ba0701457e
commit 8f174b1308
2 changed files with 3 additions and 6 deletions

View File

@@ -1,6 +0,0 @@
/ insert_bottom "[data-hook='admin_orders_index_row_actions']"
-# See also: app/overrides/add_capture_order_shortcut.rb
- if order.ready_to_ship?
- # copied from backend/app/views/spree/admin/payments/_list.html.erb
= link_to_with_icon "icon-road", t('admin.orders.index.ship'), fire_admin_order_url(order, :e => 'ship'), :method => :put, :no_text => true, :data => {:action => 'ship', :confirm => t(:are_you_sure)}

View File

@@ -93,6 +93,9 @@
%td.align-center= order.display_total.to_html
%td.actions.align-center{"data-hook" => "admin_orders_index_row_actions"}
= link_to_edit_url edit_admin_order_path(order), :title => "admin_edit_#{dom_id(order)}", :no_text => true
- if order.ready_to_ship?
- # copied from backend/app/views/spree/admin/payments/_list.html.erb
= link_to_with_icon "icon-road", t('admin.orders.index.ship'), fire_admin_order_url(order, :e => 'ship'), :method => :put, :no_text => true, :data => {:action => 'ship', :confirm => t(:are_you_sure)}
- else
.no-objects-found
= t(:no_orders_found)