FIX: Ember doesn't allow one route name, `basic`, and Discourse used it!

This commit is contained in:
Robin Ward 2014-04-15 12:25:09 -04:00
parent c820747ea3
commit c9c95a9ac2
3 changed files with 10 additions and 10 deletions

View File

@ -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);
});

View File

@ -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');
}
});
}
});

View File

@ -1,7 +1,7 @@
<tr>
<td class="title">{{title}}</td>
<td class="value">{{#link-to 'adminUsersList.newuser'}}{{valueAtTrustLevel data 0}}{{/link-to}}</td>
<td class="value">{{#link-to 'adminUsersList.basic'}}{{valueAtTrustLevel data 1}}{{/link-to}}</td>
<td class="value">{{#link-to 'adminUsersList.basicuser'}}{{valueAtTrustLevel data 1}}{{/link-to}}</td>
<td class="value">{{#link-to 'adminUsersList.regular'}}{{valueAtTrustLevel data 2}}{{/link-to}}</td>
<td class="value">{{#link-to 'adminUsersList.leaders'}}{{valueAtTrustLevel data 3}}{{/link-to}}</td>
<td class="value">{{#link-to 'adminUsersList.elders'}}{{valueAtTrustLevel data 4}}{{/link-to}}</td>