Add image to product
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 68 B |
@@ -82,6 +82,7 @@ App.ApplicationController = Ember.Controller.extend
|
||||
if list.get('join_requests').toArray().length
|
||||
@transitionToRoute 'join_requests'
|
||||
callback.call(@) if callback
|
||||
@transitionToRoute 'active_list' if @currentRouteName is 'index'
|
||||
error = @ajaxError (emberError)=>
|
||||
# if jqXHR.status == 404 officially, now assume close list on error
|
||||
#@redirect_to 'index', message: 'the_list_has_been_closed'
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
App.ModalProductInfoController = Ember.ObjectController.extend
|
||||
actions:
|
||||
close: ->
|
||||
@get('model.cancel').call(@) if @get('model.cancel')
|
||||
@send 'closeModal'
|
||||
@@ -29,6 +29,4 @@ App.TableController = Ember.ObjectController.extend
|
||||
toggleProductCategory: (product_category)->
|
||||
product_category.set 'collapsed', not product_category.get('collapsed')
|
||||
showProductDescription: (product)->
|
||||
@send 'openModal', 'modal_info', Ember.Object.create
|
||||
title: product.get('name')
|
||||
body: textile(product.get('description'))
|
||||
@send 'openModal', 'modal_product_info', product
|
||||
|
||||
@@ -3,5 +3,6 @@ App.Product = DS.Model.extend
|
||||
name: attr 'string'
|
||||
price: attr 'number'
|
||||
description: attr 'string'
|
||||
image: attr()
|
||||
product_category: DS.belongsTo('product_category')
|
||||
product_orders: DS.hasMany('product_order')
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
modal-dialog action="close"
|
||||
h3.flush--top= name
|
||||
if image
|
||||
.right: img src=image.small alt=""
|
||||
p==description
|
||||
hr
|
||||
button{action "close"}= t 'modal.info.close'
|
||||
@@ -1,3 +1,5 @@
|
||||
.display-panel
|
||||
//TODO: something smart
|
||||
.display-row
|
||||
+grid-row
|
||||
.display-label
|
||||
|
||||
Reference in New Issue
Block a user