Add ember product_order display for user

This commit is contained in:
2014-09-05 14:09:39 +02:00
parent be3d0f635a
commit 5ef6ef74ff
2 changed files with 3 additions and 5 deletions
@@ -9,6 +9,7 @@ App.ProductOrder = DS.Model.extend
increment: ->
@set('quantity', @get('quantity') + 1)
total: (-> @get('quantity') * @get('price')).property('quantity', 'price')
display: (-> "#{@get('quantity')} x #{@get('product.name')}").property('quantity', 'product.name')
setOrder: (order)->
@set('placed', true)
@set('order', order)
@@ -4,11 +4,8 @@ hr.hide-for-medium-up
ul.product-orders
each product_order in product_orders
li.product-order
= product_order.quantity
| x
= product_order.product.name
button.product-order-remove.right{action "removeProductOrder" product_order}
span.icon
= product_order.display
button.product-order-remove.right{action "removeProductOrder" product_order}: span.icon
span.currency=currency product_order.total
else
li= t 'product_orders.no_orders'