mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-07 22:46:06 +00:00
This old gem implemented some functionality for handling nils which is no longer needed, as it's provided natively by Ruby with the &. operator.
56 lines
1.5 KiB
Plaintext
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)}
|