Files
openfoodnetwork/app/views/spree/orders/_summary.html.haml

32 lines
1.4 KiB
Plaintext

- display_footer = true if display_footer.nil?
%table#line-items{"data-hook" => "order_details"}
%col{valign: "middle"}/
%col{halign: "center", valign: "middle", width: "5%"}/
%col{halign: "center", valign: "middle", width: "5%"}/
%col{halign: "center", valign: "middle", width: "5%"}/
%thead{"data-hook" => ""}
%tr{"data-hook" => "order_details_line_items_headers"}
%th= t(:item)
%th.price= t(:price)
%th.text-center.qty= t(:qty)
%th.text-right.total
%span= t(:total)
%tbody{"data-hook" => ""}
- order.line_items.sorted_by_name_and_unit_value.each do |item|
%tr.line_item{"data-hook" => "order_details_line_item_row", class: "variant-#{item.variant.id}" }
%td(data-hook = "order_item_description")
%div.item-thumb-image{"data-hook" => "order_item_image"}
= render 'spree/shared/variant_thumbnail', variant: item.variant
= render 'spree/shared/line_item_name', line_item: item
%td.text-right.price{"data-hook" => "order_item_price"}
%span= item.single_display_amount_with_adjustments.to_html
%td.text-center{"data-hook" => "order_item_qty"}= item.quantity
%td.text-right.total{"data-hook" => "order_item_total"}
%span= item.display_amount_with_adjustments.to_html
= render partial: "spree/orders/totals_footer", locals: { order: order } if display_footer