You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
1.0 KiB

<div class='toolbar'>
<ul class='actions'>
<li>
<%= button_link_to t("new_credit_card_payment"), new_admin_order_creditcard_payment_url(@order), :icon => 'add' %>
</li>
</ul>
<br class='clear' />
</div>
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current => "Payments"} %>
<table class="index">
<tr>
<th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
<th><%= t("amount") %></th>
<th><%= t("type") %></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.class.to_s %></td>
<!-- TODO: don't assume credit card, make it possible to edit other kinds of payments -->
<td>
<% url = payment.type == "CreditcardPayment" ? edit_admin_order_creditcard_payment_url(@order, payment) : edit_admin_order_paypal_payment_url(@order, payment) %>
<%= link_to_with_icon 'edit', t('edit'), url %>
</td>
</tr>
<% end %>
</table>