From 377084a60d129ea45fdf629dddc6c6e924a14951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Borud?= Date: Thu, 27 Feb 2020 16:19:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20redirect=20to=20posts=20?= =?UTF-8?q?list=20when=20deleting=20a=20page=20(#1486)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue - success routine when deleting a post/page was not taking into consideration the type of record being deleted - deleting a post should keep previous behaviour of redirecting to posts list - deleting a page should redirect to the pages list --- ghost/admin/app/routes/editor.js | 4 ++-- ghost/admin/app/templates/editor.hbs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ghost/admin/app/routes/editor.js b/ghost/admin/app/routes/editor.js index 75140d95f3..ed42a7ec3c 100644 --- a/ghost/admin/app/routes/editor.js +++ b/ghost/admin/app/routes/editor.js @@ -66,8 +66,8 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, { this.controller.send('toggleReAuthenticateModal'); }, - redirectToContentScreen() { - this.transitionTo('posts'); + redirectToContentScreen(displayName) { + this.transitionTo(displayName === 'page' ? 'pages' : 'posts'); }, willTransition(transition) { diff --git a/ghost/admin/app/templates/editor.hbs b/ghost/admin/app/templates/editor.hbs index 08e6d531e6..55ed702d3e 100644 --- a/ghost/admin/app/templates/editor.hbs +++ b/ghost/admin/app/templates/editor.hbs @@ -94,7 +94,7 @@ {{#if this.showDeletePostModal}} {{/if}}