diff --git a/app/assets/javascripts/discourse/controllers/badges/index.js.es6 b/app/assets/javascripts/discourse/controllers/badges/index.js.es6 new file mode 100644 index 00000000000..7a52169dd08 --- /dev/null +++ b/app/assets/javascripts/discourse/controllers/badges/index.js.es6 @@ -0,0 +1,4 @@ +export default Ember.ArrayController.extend({ + sortProperties: ['displayName'], + sortAscending: true +}); diff --git a/app/assets/javascripts/discourse/routes/badges_index_route.js b/app/assets/javascripts/discourse/routes/badges_index_route.js index 520677d24ee..f7bf2667471 100644 --- a/app/assets/javascripts/discourse/routes/badges_index_route.js +++ b/app/assets/javascripts/discourse/routes/badges_index_route.js @@ -15,5 +15,10 @@ Discourse.BadgesIndexRoute = Discourse.Route.extend({ } else { return Discourse.Badge.findAll(); } + }, + + setupController: function(controller, model) { + controller.set('model', model); + Discourse.set('title', I18n.t('badges.title')); } }); diff --git a/app/assets/javascripts/discourse/routes/badges_show_route.js b/app/assets/javascripts/discourse/routes/badges_show_route.js index a4c4cc83180..842bf36e324 100644 --- a/app/assets/javascripts/discourse/routes/badges_show_route.js +++ b/app/assets/javascripts/discourse/routes/badges_show_route.js @@ -27,6 +27,7 @@ Discourse.BadgesShowRoute = Ember.Route.extend({ controller.set('userBadgesLoaded', true); }); controller.set('model', model); + Discourse.set('title', model.get('displayName')); }, actions: {