Allow adminCustomizeThemes.edit route name to be overridden in themes-show

This commit is contained in:
David Taylor 2018-03-28 23:17:23 +01:00 committed by Sam
parent 37fe1c76b9
commit a17cb11dc3
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,8 @@ const THEME_UPLOAD_VAR = 2;
export default Ember.Controller.extend({
editRouteName: 'adminCustomizeThemes.edit',
@computed("model", "allThemes")
parentThemes(model, allThemes) {
let parents = allThemes.filter(theme =>
@ -142,7 +144,7 @@ export default Ember.Controller.extend({
},
editTheme() {
let edit = ()=>this.transitionToRoute('adminCustomizeThemes.edit', this.get('model.id'), 'common', 'scss');
let edit = ()=>this.transitionToRoute(this.get('editRouteName'), this.get('model.id'), 'common', 'scss');
if (this.get("model.remote_theme")) {
bootbox.confirm(I18n.t("admin.customize.theme.edit_confirm"), result => {