Ensure capture shortcut button shows for the correct payment

This commit is contained in:
David Cook
2013-08-09 14:10:08 +10:00
parent c915bb91cf
commit 5baf9938e1
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
-# copied from backend/app/views/spree/admin/payments/_list.html.erb
- # Get the payment in 'checkout' state if any, and show capture button
- 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}
- payment = order.payments.select{|p| p if p.state == 'checkout'}.first
- if !payment.nil?
- payment.actions.grep(/^capture$/).each do |action|
- # copied from backend/app/views/spree/admin/payments/_list.html.erb
= link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, payment, :e => action), :method => :put, :no_text => true, :data => {:action => action}

0
libpeerconnection.log Normal file
View File