Files
openfoodnetwork/app/views/admin/subscriptions/_subscription_line_items.html.haml

54 lines
1.9 KiB
Plaintext

%table#subscription-line-items
%colgroup
%col{:style => "width: 49%;"}/
%col{:style => "width: 14%;"}/
%col{:style => "width: 10%;"}/
%col{:style => "width: 14%;"}/
%col{:style => "width: 8%;"}/
%thead
%tr
%th= t(:item_description)
%th.price= t(:price)
%th.quantity= t(:qty)
%th.total
%span= t(:total)
%th.orders-actions.actions
%tbody
%tr.item{ id: "sli_{{$index}}", ng: { repeat: "item in subscription.subscription_line_items | filter:{ _destroy: '!true' }", class: { even: 'even', odd: 'odd' } } }
%td.description {{ item.description }}
%td.price.align-center {{ item.price_estimate | currency }}
%td.quantity
%input{ name: 'quantity', type: 'number', min: 0, ng: { model: 'item.quantity' } }
%td.total.align-center {{ (item.price_estimate * item.quantity) | currency }}
%td.actions
%a.delete-item.icon-trash.no-text{ ng: { click: 'removeSubscriptionLineItem(item)'}, :href => "javascript:void(0)" }
%tbody#subtotal.no-border-top{"data-hook" => "admin_order_form_subtotal"}
%tr#subtotal-row
%td{:colspan => "3"}
%b
= t(:subtotal)
\:
%td.total.align-center
%span#order_subtotal {{ subscription.estimatedSubtotal() | currency }}
%td.actions
%tbody#fees.no-border-top{ ng: { show: "subscription.estimatedFees() > 0" } }
%tr#fees-row
%td{:colspan => "3"}
%b
= t(:fees)
\:
%td.total.align-center
%span#order_fees {{ subscription.estimatedFees() | currency }}
%td.actions
%tbody#order-total.grand-total.no-border-top{"data-hook" => "admin_order_form_total"}
%tr
%td{:colspan => "3"}
%b
= t(:order_total_price)
\:
%td.total.align-center
%span#order_form_total {{ subscription.estimatedTotal() | currency }}
%td.actions
%p.notice
= t ".this_is_an_estimate"