mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
Import payments/_list.html.erb from spree_backend
This commit is contained in:
26
app/views/spree/admin/payments/_list.html.erb
Normal file
26
app/views/spree/admin/payments/_list.html.erb
Normal 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>
|
||||
Reference in New Issue
Block a user