Move deface to a partial

This commit is contained in:
Rohan Mitchell
2013-07-23 16:50:42 +10:00
parent 1d2704ab4c
commit 1dd92d0133
2 changed files with 6 additions and 6 deletions

View File

@@ -1,12 +1,7 @@
Deface::Override.new(:virtual_path => "spree/admin/orders/index",
:name => "add_capture_order_shortcut",
:insert_bottom => "[data-hook='admin_orders_index_row_actions']",
#copied from backend / app / views / spree / admin / payments / _list.html.erb:
:text => '<% if ! order.payments.empty? %>
<% order.payments.last.actions.grep(/^capture$/).each do |action| %>
<%= link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, order.payments.last, :e => action), :method => :put, :no_text => true, :data => {:action => action} %>
<% end %>
<% end %>'
:partial => 'spree/admin/orders/capture'
)
#Resize columns to fit new button (note: this may break with a new version of spree)

View File

@@ -0,0 +1,5 @@
-# copied from backend/app/views/spree/admin/payments/_list.html.erb
- if order.payments.present?
- order.payments.last.actions.grep(/^capture$/).each do |action|
= link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, order.payments.last, :e => action), :method => :put, :no_text => true, :data => {:action => action}