FIX: Admin section wasn't correctly highlighting some routes

This commit is contained in:
Robin Ward 2015-11-20 15:07:04 -05:00
parent e82145cbf9
commit 1bf2b236cb
5 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
export default Ember.Route.extend({
beforeModel() {
this.replaceWith('adminCustomize.colors');
this.transitionTo('adminCustomize.colors');
}
});

View File

@ -1,5 +1,5 @@
export default Discourse.Route.extend({
beforeModel: function() {
this.replaceWith('adminUsersList.show', 'active');
this.transitionTo('adminUsersList.show', 'active');
}
});

View File

@ -4,15 +4,15 @@ import { outputExportResult } from 'discourse/lib/export-result';
export default Discourse.Route.extend({
actions: {
exportUsers: function() {
exportUsers() {
exportEntity('user_list').then(outputExportResult);
},
sendInvites: function() {
sendInvites() {
this.transitionTo('userInvited', Discourse.User.current());
},
deleteUser: function(user) {
deleteUser(user) {
Discourse.AdminUser.create(user).destroy({ deletePosts: true });
}
}

View File

@ -7,9 +7,9 @@
{{#if currentUser.admin}}
{{nav-item route='adminSiteSettings' label='admin.site_settings.title'}}
{{/if}}
{{nav-item route='adminUsersList.show' routeParam='active' label='admin.users.title'}}
{{nav-item route='adminUsersList' label='admin.users.title'}}
{{#if showBadges}}
{{nav-item route='adminBadges.index' label='admin.badges.title'}}
{{nav-item route='adminBadges' label='admin.badges.title'}}
{{/if}}
{{#if currentUser.admin}}
{{nav-item route='adminGroups' label='admin.groups.title'}}
@ -18,7 +18,7 @@
{{nav-item route='adminFlags' label='admin.flags.title'}}
{{nav-item route='adminLogs' label='admin.logs.title'}}
{{#if currentUser.admin}}
{{nav-item route='adminCustomize.colors' label='admin.customize.title'}}
{{nav-item route='adminCustomize' label='admin.customize.title'}}
{{nav-item route='admin.api' label='admin.api.title'}}
{{nav-item route='admin.backups' label='admin.backups.title'}}
{{/if}}

View File

@ -1,7 +1,7 @@
<div class='customize'>
{{#admin-nav}}
{{nav-item route='adminCustomize.colors' label='admin.customize.colors.title'}}
{{nav-item route='adminCustomizeCssHtml.index' label='admin.customize.css_html.title'}}
{{nav-item route='adminCustomizeCssHtml' label='admin.customize.css_html.title'}}
{{nav-item route='adminSiteText' label='admin.site_text.title'}}
{{nav-item route='adminCustomizeEmailTemplates' label='admin.customize.email_templates.title'}}
{{nav-item route='adminUserFields' label='admin.user_fields.title'}}