suryart/spree_ebsin

View on GitHub
app/views/spree/admin/payments/_list.html.erb

Summary

Maintainability
Test Coverage
<table class="index">
  <tr>
    <th><%= "#{Spree.t('spree.date')}/#{Spree.t('spree.time')}" %></th>
    <th><%= Spree.t("amount") %></th>
    <th><%= Spree.t("payment_method") %></th>
    <th></th>
  </tr>
  <% payments.each do |payment| %>
    <tr>
      <td><%= payment.created_at.to_s(:date_time24) %></td>
      <td><%= number_to_currency(payment.amount) %></td>
      <td><%= payment_method_name payment %></td>
      <td>
                <% unless payment_method_name(payment) == 'Ebsin' %>
            <%= link_to Spree.t('show'), admin_order_payment_path(@order, payment) %>
            <% payment.actions.each do |action| %>
              <%= link_to Spree.t(action), fire_admin_order_payment_path(@order, payment, :e => action), :method => :put, :confirm => Spree.t('are_you_sure') %>
            <% end %>
                <% end %>
      </td>
    </tr>
  <% end %>
</table>