mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
%tr.line-item
|
|
%td.cart-item-image{"data-hook" => "cart_item_image"}
|
|
- if variant.images.length == 0
|
|
= link_to small_image(variant.product), variant.product
|
|
- else
|
|
= link_to image_tag(variant.images.first.attachment.url(:small)), variant.product
|
|
|
|
%td.cart-item-description{"data-hook" => "cart_item_description"}
|
|
%h4= link_to variant.product.name, product_path(variant.product)
|
|
= variant.options_text
|
|
- if @order.insufficient_stock_lines.include? line_item
|
|
%span.out-of-stock
|
|
= variant.in_stock? ? t(:insufficient_stock, :on_hand => variant.on_hand) : t(:out_of_stock)
|
|
%br
|
|
= line_item_description(variant)
|
|
|
|
%td.cart-item-price{"data-hook" => "cart_item_price"}
|
|
= line_item.single_money.to_html
|
|
%td.cart-item-quantity{"data-hook" => "cart_item_quantity"}
|
|
= item_form.number_field :quantity, :min => 0, :class => "line_item_quantity", :size => 5
|
|
%td.cart-item-total{"data-hook" => "cart_item_total"}
|
|
= line_item.display_amount.to_html unless line_item.quantity.nil?
|
|
|
|
%td.cart-item-delete{"data-hook" => "cart_item_delete"}
|
|
{{ quantity }}
|
|
= link_to image_tag('icons/delete.png'), '#', :class => 'delete',
|
|
:id => "delete_#{dom_id(line_item)}"
|