Sha256: 97731b2fec3deeca32d1dea55fd0bdb25141a131e4a3e168418aca9f1ed4d958
Contents?: true
Size: 1.97 KB
Versions: 15
Compression:
Stored size: 1.97 KB
Contents
<table class="index" id='payments' data-order-id='<%= @order.number %>'> <thead> <tr data-hook="payments_header"> <th><%= Spree.t(:identifier) %></th> <th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th> <th><%= Spree.t(:amount) %></th> <th><%= Spree.t(:payment_method) %></th> <th><%= Spree.t(:transaction_id) %></th> <th><%= Spree.t(:payment_state) %></th> <th class="actions"></th> </tr> </thead> <tbody> <% payments.each do |payment| %> <tr id="<%= dom_id(payment) %>" data-hook="payments_row" class="<%= cycle('odd', 'even', name: 'payment_table_cycle')%>"> <td><%= link_to payment.identifier, spree.admin_order_payment_path(@order, payment) %></td> <td><%= pretty_time(payment.created_at) %></td> <td class="align-center amount"><%= payment.display_amount.to_html %></td> <td class="align-center"><%= payment_method_name(payment) %></td> <td class="align-center"><%= payment.transaction_id %></td> <td class="align-center"> <span class="state <%= payment.state %>"><%= Spree.t(payment.state, :scope => :payment_states, :default => payment.state.capitalize) %></span></td> <td class="actions"> <% allowed_actions = payment.actions.select { |a| can?(a.to_sym, payment) } %> <% allowed_actions.each do |action| %> <% if action == 'credit' %> <%= link_to_with_icon 'reply', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true %> <% elsif action == 'capture' && !@order.completed? %> <%# no capture prior to completion. payments get captured when the order completes. %> <% 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} %> <% end %> <% end %> </td> </tr> <% end %> </tbody> </table>
Version data entries
15 entries across 15 versions & 1 rubygems