<table class="index" id='payments' data-order-id='<%= @order.number %>'>
  <thead>
    <tr data-hook="refunds_header">
      <th><%= Spree::Refund.human_attribute_name(:created_at) %></th>
      <th><%= Spree::Payment.human_attribute_name(:number) %></th>
      <th><%= Spree::Refund.human_attribute_name(:amount) %></th>
      <th><%= Spree::PaymentMethod.model_name.human %></th>
      <th><%= Spree::Refund.human_attribute_name(:transaction_id) %></th>
      <th><%= t('spree.reason') %></th>
      <% if show_actions %>
        <th class="actions"></th>
      <% end %>
    </tr>
  </thead>
  <tbody>
    <% refunds.each do |refund| %>
      <tr id="<%= dom_id(refund) %>" data-hook="refunds_row">
        <td><%= pretty_time(refund.created_at) %></td>
        <td><%= refund.payment.number %></td>
        <td class="amount"><%= refund.display_amount %></td>
        <td><%= refund.payment.payment_method.name %></td>
        <td><%= refund.transaction_id %></td>
        <td><%= truncate(refund.reason.name, length: 100) %></td>
        <% if show_actions %>
          <td class="actions">
            <%= link_to_with_icon 'edit', t('spree.actions.edit'), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true %>
          </td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>
