<%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %> |
<%= pretty_time(payment.created_at) %> |
<%= payment.display_amount %> |
<%= payment_method_name(payment) %> |
<%= payment.transaction_id %> |
<%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %>
|
<% payment.actions.each do |action| %>
<% if action == 'credit' %>
<%= link_to_with_icon 'refund', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-default btn-sm" %>
<% else %>
<%= link_to_with_icon action, Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-default btn-sm" %>
<% end %>
<% end %>
|
<% end %>