Merge pull request #2739 from techAPJ/patch-1
hide poster avatars when only two posts
This commit is contained in:
commit
defe1dd86f
|
@ -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'),
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue