Show badges filter in user profiles only when the user has badges.

This commit is contained in:
Vikhyat Korrapati 2014-04-18 04:03:13 +05:30
parent 843023d7c9
commit 5bb3a1a05a
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ Discourse.UserController = Discourse.ObjectController.extend({
}.property('viewingSelf'), }.property('viewingSelf'),
showBadges: function() { showBadges: function() {
return Discourse.SiteSettings.enable_badges; return Discourse.SiteSettings.enable_badges && (this.get('content.badge_count') > 0);
}.property(), }.property('content.badge_count'),
privateMessageView: function() { privateMessageView: function() {
return (this.get('userActionType') === Discourse.UserAction.TYPES.messages_sent) || return (this.get('userActionType') === Discourse.UserAction.TYPES.messages_sent) ||