From 5c72297695681f8355deb1678832831caf8b9dc7 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 30 Jul 2014 08:56:46 +1000 Subject: [PATCH] FEATURE: clean up badges admin --- app/assets/javascripts/admin/templates/badges.js.handlebars | 3 +++ app/assets/javascripts/discourse/components/user-badge.js.es6 | 4 ---- app/assets/javascripts/discourse/models/badge.js | 4 ++++ .../discourse/templates/components/user-badge.js.handlebars | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/admin/templates/badges.js.handlebars b/app/assets/javascripts/admin/templates/badges.js.handlebars index 1f27dc71675..57d7ae71008 100644 --- a/app/assets/javascripts/admin/templates/badges.js.handlebars +++ b/app/assets/javascripts/admin/templates/badges.js.handlebars @@ -6,7 +6,10 @@ {{#each}}
  • + + {{displayName}} + {{#if newBadge}} {{i18n filters.new.lower_title}} {{/if}} diff --git a/app/assets/javascripts/discourse/components/user-badge.js.es6 b/app/assets/javascripts/discourse/components/user-badge.js.es6 index 0c616cc12fe..b741620a4d5 100644 --- a/app/assets/javascripts/discourse/components/user-badge.js.es6 +++ b/app/assets/javascripts/discourse/components/user-badge.js.es6 @@ -1,10 +1,6 @@ export default Ember.Component.extend({ tagName: 'span', - badgeTypeClassName: function() { - return "badge-type-" + this.get('badge.badge_type.name').toLowerCase(); - }.property('badge.badge_type.name'), - showGrantCount: function() { return this.get('count') && this.get('count') > 1; }.property('count'), diff --git a/app/assets/javascripts/discourse/models/badge.js b/app/assets/javascripts/discourse/models/badge.js index 7d87a31e4fb..2a4efe640ac 100644 --- a/app/assets/javascripts/discourse/models/badge.js +++ b/app/assets/javascripts/discourse/models/badge.js @@ -99,6 +99,10 @@ Discourse.Badge = Discourse.Model.extend({ } }, + badgeTypeClassName: function() { + return "badge-type-" + this.get('badge_type.name').toLowerCase(); + }.property('badge_type.name'), + /** Save and update the badge from the server's response. diff --git a/app/assets/javascripts/discourse/templates/components/user-badge.js.handlebars b/app/assets/javascripts/discourse/templates/components/user-badge.js.handlebars index e62a8f762d0..9d084d9c5fe 100644 --- a/app/assets/javascripts/discourse/templates/components/user-badge.js.handlebars +++ b/app/assets/javascripts/discourse/templates/components/user-badge.js.handlebars @@ -1,5 +1,5 @@ {{#link-to 'badges.show' badge}} - + {{#if isIcon}} {{else}}