From 35d9545c686e72ec3c2c46591aebc5eaf92d48bc Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 1 Feb 2021 10:33:05 +0000 Subject: [PATCH] Hid preview post button unless post has been created and is a draft refs https://github.com/TryGhost/Team/issues/459 - hid when post is published - we have no facility for previewing unsaved changes to a published post via the front-end which would mean the desktop/mobile preview tabs are not useful - email preview content is similarly generated from saved data meaning that tab wouldn't serve as a preview (plus emails can't currently be sent for an already published post) - hid when post is "new" (unsaved) - similar to the reasoning for hiding when published, if the post is not saved then no content exists for the server-side previews to be generated --- ghost/admin/app/templates/editor.hbs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghost/admin/app/templates/editor.hbs b/ghost/admin/app/templates/editor.hbs index 0ea4e5eb2d..f7c18ed64f 100644 --- a/ghost/admin/app/templates/editor.hbs +++ b/ghost/admin/app/templates/editor.hbs @@ -37,8 +37,11 @@ {{/if}}
- {{#unless this.post.isNew}} + {{#if this.post.isDraft}} + + {{/if}} + {{#if this.session.user.isContributor}}