Merge pull request #2739 from techAPJ/patch-1

hide poster avatars when only two posts
This commit is contained in:
Jeff Atwood 2014-09-02 09:54:52 -07:00
commit defe1dd86f
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

@ -39,14 +39,16 @@
</li>
{{/if}}
{{#if details.links.length}}
<li class='secondary'>
{{number details.links.length}}
<h4>{{i18n links_lowercase}}</h4>
</li>
<li class='secondary'>
{{number details.links.length}}
<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}}
<li {{bind-attr class=":avatars mapCollapsed::hidden"}}>
{{#grouped-each participant in details.fewParticipants}}{{topic-participant participant=participant}}{{/grouped-each}}
</li>
</ul>
</section>