mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
34 lines
1.5 KiB
Plaintext
34 lines
1.5 KiB
Plaintext
%tr.line-item{class: "variant-#{variant.id}"}
|
|
%td.cart-item-description{'data-hook' => "cart_item_description"}
|
|
|
|
%div.item-thumb-image{"data-hook" => "cart_item_image"}
|
|
= render 'spree/shared/variant_thumbnail', variant: variant
|
|
|
|
= render 'spree/shared/line_item_name', line_item: line_item
|
|
|
|
- if @insufficient_stock_lines.andand.include? line_item
|
|
%span.out-of-stock
|
|
= variant.in_stock? ? t(".insufficient_stock", :on_hand => variant.on_hand) : t(".out_of_stock")
|
|
%br/
|
|
|
|
- if @unavailable_order_variants.andand.include? line_item.variant
|
|
%span.out-of-stock
|
|
= t(".unavailable_item")
|
|
%br/
|
|
|
|
%td.text-right.cart-item-price{"data-hook" => "cart_item_price"}
|
|
= line_item.single_display_amount_with_adjustments.to_html
|
|
%td.text-center.cart-item-quantity{"data-hook" => "cart_item_quantity"}
|
|
- finalized_quantity = @order.completed? ? line_item.quantity : 0
|
|
= item_form.number_field :quantity,
|
|
:min => 0, "ofn-on-hand" => "#{variant.on_demand && 9999 || variant.on_hand}",
|
|
"finalizedquantity" => finalized_quantity, :class => "line_item_quantity", :size => 5,
|
|
"ng-model" => "line_item_#{line_item.id}",
|
|
"validate-stock-quantity" => true
|
|
%td.cart-item-total.text-right{"data-hook" => "cart_item_total"}
|
|
= line_item.display_amount_with_adjustments.to_html unless line_item.quantity.nil?
|
|
|
|
%td.cart-item-delete.text-center{"data-hook" => "cart_item_delete"}
|
|
%a.delete{href: "#", id: "delete_#{dom_id(line_item)}"}
|
|
%i.delete.ofn-i_026-trash
|