Link queued post avatar and username to user profile
This commit is contained in:
parent
5990ab855b
commit
2c53a8b7bc
|
@ -0,0 +1,6 @@
|
|||
export default Ember.Component.extend({
|
||||
tagName: 'a',
|
||||
attributeBindings: ['href', 'data-user-card'],
|
||||
href: Ember.computed.alias('user.path'),
|
||||
'data-user-card': Ember.computed.alias('user.username_lower')
|
||||
});
|
|
@ -3,11 +3,18 @@
|
|||
{{#each ctrl in model itemController='queued-post'}}
|
||||
<div class='queued-post'>
|
||||
<div class='poster'>
|
||||
{{avatar ctrl.post.user imageSize="large"}}
|
||||
{{#user-link user=ctrl.post.user}}
|
||||
{{avatar ctrl.post.user imageSize="large"}}
|
||||
{{/user-link}}
|
||||
|
||||
</div>
|
||||
<div class='cooked'>
|
||||
<div class='names'>
|
||||
<span class='username'>{{ctrl.post.user.username}}</span>
|
||||
<span class="username">
|
||||
{{#user-link user=ctrl.post.user}}
|
||||
{{ctrl.post.user.username}}
|
||||
{{/user-link}}
|
||||
</span>
|
||||
</div>
|
||||
<div class='clearfix'></div>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class QueuedPostSerializer < ApplicationSerializer
|
|||
:created_at,
|
||||
:category_id
|
||||
|
||||
has_one :user, serializer: BasicUserSerializer, embed: :object
|
||||
has_one :user, serializer: BasicUserSerializer
|
||||
has_one :topic, serializer: BasicTopicSerializer
|
||||
|
||||
def category_id
|
||||
|
|
Loading…
Reference in New Issue