Sha256: 6bd162e4dba88e0c97e65b0475a32c6e44f280b5ab43ae927c5c7ea246e87ea2

Contents?: true

Size: 1.95 KB

Versions: 38

Compression:

Stored size: 1.95 KB

Contents

<table class="table table-bordered" id='payments' data-order-id='<%= @order.number %>'>
  <thead>
    <tr data-hook="payments_header">
      <th><%= Spree::Payment.human_attribute_name(:number) %></th>
      <th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
      <th class="text-center"><%= Spree.t(:amount) %></th>
      <th class="text-center"><%= Spree.t(:payment_method) %></th>
      <th class="text-center"><%= Spree.t(:transaction_id) %></th>
      <th class="text-center"><%= Spree.t(:payment_state) %></th>
      <th class="actions text-center"></th>
    </tr>
  </thead>
  <tbody>
    <% payments.each do |payment| %>
      <tr id="<%= dom_id(payment) %>" data-hook="payments_row">
        <td><%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %></td>
        <td><%= pretty_time(payment.created_at) %></td>
        <td class="amount text-center"><%= payment.display_amount %></td>
        <td class="text-center"><%= payment_method_name(payment) %></td>
        <td class="text-center"><%= payment.transaction_id %></td>
        <td class="text-center">
          <span class="label label-<%= payment.state %>">
            <%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %>
          </span>
        </td>
        <td class="actions actions-2 text-center">
          <% payment.actions.each do |action| %>
            <% if action == 'credit' %>
              <%= link_to_with_icon('refund', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-default btn-sm") if can?(:create, Spree::Refund) %>
            <% 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 }, class: "btn btn-default btn-sm") if can?(action.to_sym, payment) %>
            <% end %>
          <% end %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
spree_backend-3.2.9 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.14 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.8 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.13 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.7 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.12 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.6 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.11 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.10 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.5 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.9 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.4 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.8 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.7 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.3 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.2 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.6 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.1.5 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.1 app/views/spree/admin/payments/_list.html.erb
spree_backend-3.2.0 app/views/spree/admin/payments/_list.html.erb