FIX: Allow theme edit route name to be overridden

This is required for the theme-creator plugin, this change won't have
any effect on regular Discourse installations
This commit is contained in:
David Taylor 2018-10-11 13:20:04 +01:00
parent 6a444eee56
commit 1b0fbc4d30

View File

@ -11,6 +11,7 @@ export default Ember.Controller.extend({
downloadUrl: url("model.id", "/admin/themes/%@"), downloadUrl: url("model.id", "/admin/themes/%@"),
previewUrl: url("model.id", "/admin/themes/%@/preview"), previewUrl: url("model.id", "/admin/themes/%@/preview"),
addButtonDisabled: Em.computed.empty("selectedChildThemeId"), addButtonDisabled: Em.computed.empty("selectedChildThemeId"),
editRouteName: "adminCustomizeThemes.edit",
@computed("model", "allThemes", "model.component") @computed("model", "allThemes", "model.component")
parentThemes(model, allThemes) { parentThemes(model, allThemes) {
@ -147,7 +148,7 @@ export default Ember.Controller.extend({
}, },
transitionToEditRoute() { transitionToEditRoute() {
this.transitionToRoute( this.transitionToRoute(
"adminCustomizeThemes.edit", this.get("editRouteName"),
this.get("model.id"), this.get("model.id"),
"common", "common",
"scss" "scss"