mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🐛 Fixed redirect to posts list when deleting a page (#1486)
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
This commit is contained in:
parent
926fd8f01c
commit
377084a60d
2 changed files with 3 additions and 3 deletions
|
@ -66,8 +66,8 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, {
|
||||||
this.controller.send('toggleReAuthenticateModal');
|
this.controller.send('toggleReAuthenticateModal');
|
||||||
},
|
},
|
||||||
|
|
||||||
redirectToContentScreen() {
|
redirectToContentScreen(displayName) {
|
||||||
this.transitionTo('posts');
|
this.transitionTo(displayName === 'page' ? 'pages' : 'posts');
|
||||||
},
|
},
|
||||||
|
|
||||||
willTransition(transition) {
|
willTransition(transition) {
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
{{#if this.showDeletePostModal}}
|
{{#if this.showDeletePostModal}}
|
||||||
<GhFullscreenModal @modal="delete-post"
|
<GhFullscreenModal @modal="delete-post"
|
||||||
@model={{hash post=this.post onSuccess=(route-action 'redirectToContentScreen')}}
|
@model={{hash post=this.post onSuccess=(route-action 'redirectToContentScreen' this.post.displayName)}}
|
||||||
@close={{action "toggleDeletePostModal"}}
|
@close={{action "toggleDeletePostModal"}}
|
||||||
@modifier="action wide" />
|
@modifier="action wide" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue