Add avatars on accounts list
This commit is contained in:
parent
d3bf48a415
commit
a731028dfa
|
@ -4,6 +4,7 @@
|
|||
Account = Model.extend
|
||||
name: DS.attr()
|
||||
type: DS.attr()
|
||||
avatarUrl: DS.attr()
|
||||
reposCount: DS.attr('number')
|
||||
subscribed: DS.attr('boolean')
|
||||
education: DS.attr('boolean')
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
{{#link-to "account" view.account class="name"}}
|
||||
<div class="media">
|
||||
<div class="media-elem">
|
||||
<img src="//placehold.it/50x50" alt="">
|
||||
<img {{bind-attr src="view.avatarUrl"}} alt="">
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h2>{{view.name}}</h2>
|
||||
|
|
|
@ -25,6 +25,10 @@ View = Ember.CollectionView.extend
|
|||
accountUrl(@get('account.login'))
|
||||
).property('account.login')
|
||||
|
||||
avatarUrl: (->
|
||||
@get('account.avatarUrl') || "//placehold.it/50x50"
|
||||
).property('account.avatarUrl')
|
||||
|
||||
click: ->
|
||||
@get('controller').transitionToRoute("account", @get('account.login'))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user