%table.index
  %thead
    %tr
      %th= "#{Spree.t('date')}/#{Spree.t('time')}"
      %th= t(:amount)
      %th= t(:payment_method)
      %th= t(:payment_state)
      %th.actions
  %tbody
    - payments.each do |payment|
      %tr{class: "#{cycle('odd', 'even')}"}
        %td= pretty_time(payment.created_at)
        %td.align-center= payment.display_amount.to_html
        %td.align-center= link_to payment_method_name(payment), spree.admin_order_payment_path(@order, payment)
        %td.align-center
          %span{class: "state #{payment.state}"}= t(payment.state, scope: :payment_states, default: payment.state.capitalize)
        %td.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}
