Skip to content

Commit

Permalink
Merge pull request #2739 from techAPJ/patch-1
Browse files Browse the repository at this point in the history
hide poster avatars when only two posts
  • Loading branch information
coding-horror committed Sep 2, 2014
2 parents abd84cd + 8955bf0 commit defe1dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/discourse/components/topic-map.js.es6
Expand Up @@ -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'),
Expand Down
Expand Up @@ -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>

Expand Down

0 comments on commit defe1dd

Please sign in to comment.