mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 09:57:49 +08:00
Allow adminCustomizeThemes.edit route name to be overridden
This commit is contained in:
@ -5,6 +5,8 @@ export default Ember.Controller.extend({
|
||||
maximized: false,
|
||||
section: null,
|
||||
|
||||
editRouteName: 'adminCustomizeThemes.edit',
|
||||
|
||||
targets: [
|
||||
{ id: 0, name: 'common' },
|
||||
{ id: 1, name: 'desktop' },
|
||||
@ -52,7 +54,7 @@ export default Ember.Controller.extend({
|
||||
|
||||
let fields = this.get('model.theme_fields');
|
||||
let field = fields && fields.find(f => (f.target === target));
|
||||
this.replaceRoute('adminCustomizeThemes.edit', this.get('model.id'), target, field && field.name);
|
||||
this.replaceRoute(this.get('editRouteName'), this.get('model.id'), target, field && field.name);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user