Files
openfoodnetwork/app/views/spree/order_mailer/cancel_email.html.haml
Maikel Linke 4facab0335 Guard against invariable file types
Australian production had one JPG image which was not recognised as
such. The `content_type` was missing and trying to generate a URL for a
variant raised an error and crashed the page.

Testing for `variable?` includes testing for `attached?` and is more
defensive.
2022-06-01 17:16:55 +10:00

31 lines
719 B
Plaintext
Executable File

%table.social.white-bg.fullwidth
%table.column
%tr
%td
%h3
= t(".customer_greeting", name: @order.bill_address.firstname)
%h4
= t(".instructions_html", distributor: @order.distributor.name )
- if @order.distributor.logo.variable?
= image_tag @order.distributor.logo_url(:medium)
%p.callout
= t(".dont_cancel", email: @order.distributor.contact.email)
%p  
%h4
= t(".order_summary_canceled_html", number: @order.number)
%p
= t(".details")
= render 'order_summary'
%p
- if @order.paid?
= t(".paid_order", distributor: @order.distributor.name)
- else
= t(".unpaid_order")
= render 'signoff'
= render 'shared/mailers/powered_by'