diff --git a/app/assets/javascripts/discourse/components/badge-card.js.es6 b/app/assets/javascripts/discourse/components/badge-card.js.es6 index b162e982ce3..a5eb0561aaa 100644 --- a/app/assets/javascripts/discourse/components/badge-card.js.es6 +++ b/app/assets/javascripts/discourse/components/badge-card.js.es6 @@ -1,37 +1,14 @@ import computed from 'ember-addons/ember-computed-decorators'; -import DiscourseURL from 'discourse/lib/url'; import { sanitize, emojiUnescape } from 'discourse/lib/text'; export default Ember.Component.extend({ size: 'medium', - classNameBindings: [':badge-card', 'size', 'badge.slug', 'navigateOnClick:hyperlink'], - - click(e){ - if (e.target && e.target.nodeName === "A") { - return true; - } - - if (!this.get('navigateOnClick')) { - return false; - } - - var url = this.get('badge.url'); - const username = this.get('username'); - if (username) { - url = url + "?username=" + encodeURIComponent(username); - } - DiscourseURL.routeTo(url); - return true; - }, + classNameBindings: [':badge-card', 'size', 'badge.slug'], @computed('count', 'badge.grant_count') displayCount(count, grantCount) { - if (count == null) { - return grantCount; - } - if (count > 1) { - return count; - } + if (count == null) { return grantCount; } + if (count > 1) { return count; } }, @computed('size') diff --git a/app/assets/javascripts/discourse/templates/badges/index.hbs b/app/assets/javascripts/discourse/templates/badges/index.hbs index b30725693b3..08b7c79b5e2 100644 --- a/app/assets/javascripts/discourse/templates/badges/index.hbs +++ b/app/assets/javascripts/discourse/templates/badges/index.hbs @@ -10,7 +10,7 @@ {{#each bg.badges as |b|}} - {{badge-card badge=b navigateOnClick="true"}} + {{badge-card badge=b}} {{/each}} {{/each}} diff --git a/app/assets/javascripts/discourse/templates/components/badge-card.hbs b/app/assets/javascripts/discourse/templates/components/badge-card.hbs index 765322dec8f..2a41b366059 100644 --- a/app/assets/javascripts/discourse/templates/components/badge-card.hbs +++ b/app/assets/javascripts/discourse/templates/components/badge-card.hbs @@ -10,7 +10,7 @@
{{i18n "user.summary.no_badges"}}
{{/each}}