Import payments/_list.html.erb from spree_backend

This commit is contained in:
Hugo Daniel
2019-07-31 16:09:48 +02:00
parent af9187947f
commit ac13ff114c

View File

@@ -0,0 +1,26 @@
<table class="index">
<thead>
<tr data-hook="payments_header">
<th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
<th><%= Spree.t(:amount) %></th>
<th><%= Spree.t(:payment_method) %></th>
<th><%= Spree.t(:payment_state) %></th>
<th class="actions"></th>
</tr>
</thead>
<tbody>
<% payments.each do |payment| %>
<tr data-hook="payments_row" class="<%= cycle('odd', 'even')%>">
<td><%= pretty_time(payment.created_at) %></td>
<td class='align-center'><%= payment.display_amount.to_html %></td>
<td class="align-center"><%= link_to payment_method_name(payment), spree.admin_order_payment_path(@order, payment) %></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">
<% payment.actions.each do |action| %>
<%= link_to_with_icon "icon-#{action}", Spree.t(action), fire_admin_order_payment_path(@order, payment, :e => action), :method => :put, :no_text => true, :data => {:action => action} %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>