From c9c95a9ac2b4f15f402701e776c2b141365e68f8 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 15 Apr 2014 12:25:09 -0400 Subject: [PATCH] FIX: Ember doesn't allow one route name, `basic`, and Discourse used it! --- .../javascripts/admin/routes/admin_routes.js | 2 +- .../admin_users_list_trust_level_routes.js | 16 ++++++++-------- .../reports/trust_levels_report.js.handlebars | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/admin/routes/admin_routes.js b/app/assets/javascripts/admin/routes/admin_routes.js index 1143df781ce..7aceb61d33b 100644 --- a/app/assets/javascripts/admin/routes/admin_routes.js +++ b/app/assets/javascripts/admin/routes/admin_routes.js @@ -52,7 +52,7 @@ Discourse.Route.buildRoutes(function() { }); this.resource('adminUsersList', { path: '/list' }, function() { _.each(['active', 'new', 'pending', 'admins', 'moderators', 'blocked', 'suspended', - 'newuser', 'basic', 'regular', 'leaders', 'elders'], function(x) { + 'newuser', 'basicuser', 'regular', 'leaders', 'elders'], function(x) { this.route(x, { path: '/' + x }); }, this); }); diff --git a/app/assets/javascripts/admin/routes/admin_users_list_trust_level_routes.js b/app/assets/javascripts/admin/routes/admin_users_list_trust_level_routes.js index 9c05d1e927f..4575299b2eb 100644 --- a/app/assets/javascripts/admin/routes/admin_users_list_trust_level_routes.js +++ b/app/assets/javascripts/admin/routes/admin_users_list_trust_level_routes.js @@ -9,21 +9,21 @@ Discourse.AdminUsersListNewuserRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('newuser'); - } + } }); /** Handles the route that lists users at trust level 1. - @class AdminUsersListBasicRoute + @class AdminUsersListBasicuserRoute @extends Discourse.Route @namespace Discourse @module Discourse **/ -Discourse.AdminUsersListBasicRoute = Discourse.Route.extend({ +Discourse.AdminUsersListBasicuserRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('basic'); - } + } }); /** @@ -37,7 +37,7 @@ Discourse.AdminUsersListBasicRoute = Discourse.Route.extend({ Discourse.AdminUsersListRegularRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('regular'); - } + } }); /** @@ -51,7 +51,7 @@ Discourse.AdminUsersListRegularRoute = Discourse.Route.extend({ Discourse.AdminUsersListLeadersRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('leader'); - } + } }); /** @@ -65,5 +65,5 @@ Discourse.AdminUsersListLeadersRoute = Discourse.Route.extend({ Discourse.AdminUsersListEldersRoute = Discourse.Route.extend({ setupController: function() { return this.controllerFor('adminUsersList').show('elder'); - } -}); \ No newline at end of file + } +}); diff --git a/app/assets/javascripts/admin/templates/reports/trust_levels_report.js.handlebars b/app/assets/javascripts/admin/templates/reports/trust_levels_report.js.handlebars index ca98def40d2..b483755fe1d 100644 --- a/app/assets/javascripts/admin/templates/reports/trust_levels_report.js.handlebars +++ b/app/assets/javascripts/admin/templates/reports/trust_levels_report.js.handlebars @@ -1,7 +1,7 @@ {{title}} {{#link-to 'adminUsersList.newuser'}}{{valueAtTrustLevel data 0}}{{/link-to}} - {{#link-to 'adminUsersList.basic'}}{{valueAtTrustLevel data 1}}{{/link-to}} + {{#link-to 'adminUsersList.basicuser'}}{{valueAtTrustLevel data 1}}{{/link-to}} {{#link-to 'adminUsersList.regular'}}{{valueAtTrustLevel data 2}}{{/link-to}} {{#link-to 'adminUsersList.leaders'}}{{valueAtTrustLevel data 3}}{{/link-to}} {{#link-to 'adminUsersList.elders'}}{{valueAtTrustLevel data 4}}{{/link-to}}