Merge pull request #2672 from cpradio/master
Only show unique badge titles in the Badge Title dropdown
This commit is contained in:
commit
4522451920
|
@ -20,6 +20,7 @@ export default Ember.ArrayController.extend({
|
|||
|
||||
selectableUserBadges: function() {
|
||||
var items = this.get('model').filterBy('badge.allow_title', true);
|
||||
items = _.uniq(items, true, function(e) { return e.get('badge.name'); });
|
||||
items.unshiftObject(Em.Object.create({
|
||||
badge: Discourse.Badge.create({name: I18n.t('badges.no_title')})
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue