From 35dffb780b10bdcad0356b93c3a16199ddce4661 Mon Sep 17 00:00:00 2001 From: paulcc Date: Mon, 21 Sep 2009 14:16:57 +0100 Subject: [PATCH] updated to spree 0.9 --- app/views/admin/orders/show.html.erb | 31 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/app/views/admin/orders/show.html.erb b/app/views/admin/orders/show.html.erb index d8c518a..eaac6a2 100644 --- a/app/views/admin/orders/show.html.erb +++ b/app/views/admin/orders/show.html.erb @@ -7,22 +7,31 @@ <%= render :partial => 'admin/shared/order_details', :locals => {:order => @order} -%> -<% unless @order.payments.empty? %> +<% if @order.bill_address %>
- <%# look at the most recent (= up to date) payment %> - <% payment = @order.payments.last %> - <% if payment.class == CreditcardPayment %> -

<%= link_to t("bill_address"), edit_admin_order_creditcard_payment_url(@order, payment) %>

- <%= render :partial => 'admin/shared/address', :locals => {:address => @order.bill_address} %> - <% else %> - <% url = edit_admin_order_paypal_payment_url(@order) %> <%#, payment) %> -

<%= link_to t("edit_paypal_info"), edit_admin_order_paypal_payment_url(@order, payment) %>

- <% end %> +

+ <%= link_to t("bill_address"), edit_admin_order_creditcard_payment_url(@order, @order.creditcard_payments.last) if @order.creditcard_payments.present? %> + <%= t("bill_address") if @order.creditcard_payments.empty? %> +

+ <%= render :partial => 'admin/shared/address', :locals => {:address => @order.bill_address} %>
<% end %> + +<% if (payment = @order.payments.last).class != CreditcardPayment %> + <%# look at the most recent (= up to date) payment for paypal %> + <% url = edit_admin_order_paypal_payment_url(@order) %> <%#, payment) %> +
+

<%= link_to t("edit_paypal_info"), edit_admin_order_paypal_payment_url(@order, payment) %>

+ (no billing address available) +
+<% end %> + <% if @order.ship_address %>
-

<%= link_to t("ship_address"), edit_admin_order_shipment_url(@order, @order.shipments.last) %>

+

+ <%= link_to t("ship_address"), edit_admin_order_shipment_url(@order, @order.shipments.last) if @order.shipments.present? %> + <%= t("ship_address") if @order.shipments.empty? %> +

<%= render :partial => 'admin/shared/address', :locals => {:address => @order.ship_address} %>
<% end %>