suppress post count on avatar for single post

This commit is contained in:
Arpit Jalan 2014-09-01 14:23:34 +05:30
parent 82d4c29c88
commit eba3f6b408
3 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,7 @@
export default Ember.Component.extend({
postStream: Em.computed.alias('participant.topic.postStream'),
showPostCount: Em.computed.gte('participant.post_count', 2),
toggled: function() {
return this.get('postStream.userFilters').contains(this.get('participant.username'));

View file

@ -88,5 +88,3 @@ export default ObjectController.extend({
}
});

View file

@ -1,4 +1,6 @@
<a href='#' {{bind-attr class=":poster toggled"}} {{action toggle}} title="{{unbound participant.username}}">
{{#if showPostCount}}
<span class='post-count'>{{unbound participant.post_count}}</span>
{{/if}}
{{avatar participant imageSize="medium"}}
</a>