Add user facebook images to supplier main board

This commit is contained in:
2014-07-29 21:15:56 +02:00
parent 2d0e656c96
commit acebd48111
7 changed files with 38 additions and 4 deletions
@@ -2,6 +2,12 @@ attr = DS.attr
Qsupplier.App.User= DS.Model.extend
facebook_id: attr('string')
email: attr('string')
name: attr('string')
list: DS.belongsTo('list') # in ember scope not many to many (yet)
join_requests: DS.hasMany('join_request')
facebook_image: (-> "http://graph.facebook.com/#{@get('facebook_id')}/picture?type=square").property('facebook_id')
facebook_image_tag: (->
name = @get('name')
url = @get('facebook_image')
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" >"
).property('facebook_image', 'name')