Files
openfoodnetwork/app/views/spree/order_mailer/_shipping.html.haml
Matt-Yorkley 1d5077061e Remove andand
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
2021-09-08 14:28:31 +01:00

56 lines
1.5 KiB
Plaintext

- if @order.shipping_method&.delivery?
/ Delivery details
%p.callout
%strong
- if @order.shipping_method&.name
#{@order.shipping_method.name.html_safe}
- else
= t :email_shipping_delivery_details
- if @order.order_cycle&.pickup_time_for(@order.distributor)
%h4
= t :email_shipping_delivery_time
%strong #{@order.order_cycle.pickup_time_for(@order.distributor)}
- if @order.shipping_method&.description
%p
%em #{@order.shipping_method.description.html_safe}
%br  
- if @order.ship_address
%h4
= t :email_shipping_delivery_address
%p
#{@order.ship_address.full_name}
%br
#{@order.ship_address.full_address}
%br
#{@order.ship_address.phone}
%br  
- else
/ Collection details
%p.callout
%strong
- if @order.shipping_method&.name
#{@order.shipping_method.name.html_safe}
- else
= t :email_shipping_collection_details
- if @order.order_cycle&.pickup_time_for(@order.distributor).present?
%h4
= t :email_shipping_collection_time
%strong #{@order.order_cycle.pickup_time_for(@order.distributor)}
- if @order.shipping_method&.description.present?
%p
%em #{@order.shipping_method.description.html_safe}
%br  
- if @order.order_cycle&.pickup_instructions_for(@order.distributor).present?
%p
%strong
= t :email_shipping_collection_instructions
%br
#{@order.order_cycle.pickup_instructions_for(@order.distributor)}