mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 04:52:00 +08:00
ca3e2b4da3
Clicking on badges filters down the list to a particular user.
16 lines
478 B
JavaScript
16 lines
478 B
JavaScript
export default Ember.Component.extend({
|
|
tagName: 'span',
|
|
|
|
showGrantCount: function() {
|
|
return this.get('count') && this.get('count') > 1;
|
|
}.property('count'),
|
|
|
|
badgeUrl: function(){
|
|
// NOTE: I tried using a link-to helper here but the queryParams mean it fails
|
|
var username = this.get('user.username_lower') || '';
|
|
username = username !== '' ? "?username=" + username : '';
|
|
return this.get('badge.url') + username;
|
|
}.property("badge", "user")
|
|
|
|
});
|