Order product user spec green
This commit is contained in:
@@ -7,5 +7,5 @@ App.ActiveListController = Ember.ObjectController.extend
|
||||
#@get('controllers.application.list')
|
||||
#).property('controllers.application.list')
|
||||
|
||||
displayTotal: (-> @get('model.orders.length') and @get('model.orders.length') > 1 ).property('model.orders.length')
|
||||
showTotal: (-> @get('model.orders.length') and @get('model.orders.length') > 1 ).property('model.orders.length')
|
||||
list: (-> @get('controllers.application.list') ).property('controllers.application.list')
|
||||
|
||||
@@ -3,10 +3,7 @@ each user in list.users
|
||||
if list.orders
|
||||
.list-orders-container
|
||||
each order in list.sorted_orders
|
||||
.list-order-container class=order.state
|
||||
= order.display
|
||||
span.currency= currency order.total
|
||||
span.created_at= time order.created_at
|
||||
App.ListOrderView contentBinding="order"
|
||||
if showTotal
|
||||
.list-orders-total.total
|
||||
= t 'total'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.row
|
||||
h2=t 'models.list'
|
||||
partial "list_content"
|
||||
link-to 'lists'
|
||||
link-to 'lists' class="button"
|
||||
span Go to lists
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
= order.display
|
||||
span.currency= currency order.total
|
||||
span.created_at= time order.created_at
|
||||
@@ -0,0 +1,17 @@
|
||||
App.ListOrderView = Ember.View.extend
|
||||
classNames: 'list-order-container'
|
||||
classNameBindings: ['content.state', 'contentWrapClass']
|
||||
templateName: 'list_order_row'
|
||||
contentWrapClass: (-> "order-row-#{@get('content.id')}").property('content.id')
|
||||
#click: ->
|
||||
#if @route_param
|
||||
#@get('controller').transitionToRoute(@route, @route_param)
|
||||
#else
|
||||
#@get('controller').transitionToRoute(@route)
|
||||
#active: (->
|
||||
#if @get('controller.currentPath') == @route then 'active' else ''
|
||||
#).property('controller.currentPath')
|
||||
#init: ->
|
||||
#@templateName = "menu_item_#{@route}"
|
||||
#@_super()
|
||||
|
||||
Reference in New Issue
Block a user