mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: Only enabled badges can be granted
FIX: Sort badges by displayName
This commit is contained in:
parent
4d6c99cb3d
commit
7d5e2d46c5
2 changed files with 9 additions and 6 deletions
|
@ -56,12 +56,12 @@ export default Ember.ArrayController.extend({
|
|||
|
||||
var badges = [];
|
||||
this.get('badges').forEach(function(badge) {
|
||||
if (badge.get('multiple_grant') || !granted[badge.get('id')]) {
|
||||
if (badge.get('enabled') && (badge.get('multiple_grant') || !granted[badge.get('id')])) {
|
||||
badges.push(badge);
|
||||
}
|
||||
});
|
||||
|
||||
return _.sortBy(badges, "name");
|
||||
return _.sortBy(badges, badge => badge.get('displayName'));
|
||||
}.property('badges.@each', 'model.@each'),
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue