hide poster avatars when only two posts

This commit is contained in:
Arpit Jalan 2014-09-02 20:03:32 +05:30
parent cfb92b6e5b
commit 8955bf02d8
2 changed files with 11 additions and 7 deletions

View File

@ -22,6 +22,8 @@ export default Ember.Component.extend({
this.set('mapCollapsed', Discourse.Mobile.mobileView || (!this.get('topic.has_summary')));
},
showPosterAvatar: Em.computed.gt('topic.posts_count', 2),
toggleMapClass: function() {
return this.get('mapCollapsed') ? 'fa fa-chevron-down' : 'fa fa-chevron-up';
}.property('mapCollapsed'),

View File

@ -44,9 +44,11 @@
<h4>{{i18n links_lowercase}}</h4>
</li>
{{/if}}
{{#if showPosterAvatar}}
<li {{bind-attr class=":avatars mapCollapsed::hidden"}}>
{{#grouped-each participant in details.fewParticipants}}{{topic-participant participant=participant}}{{/grouped-each}}
</li>
{{/if}}
</ul>
</section>