mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
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
This commit is contained in:
parent
e8970841d2
commit
35d9545c68
1 changed files with 4 additions and 1 deletions
|
@ -37,8 +37,11 @@
|
|||
{{/if}}
|
||||
|
||||
<section class="view-actions br2 {{unless this.infoMessage "bg-white"}}" style="pointer-events: auto">
|
||||
<button type="button" class="blue link f8 fw4 tracked-1 mr1 pl3 pr4 br b--lightgrey" {{on "click" (action "togglePostPreviewModal")}}>Preview {{this.post.displayName}}</button>
|
||||
{{#unless this.post.isNew}}
|
||||
{{#if this.post.isDraft}}
|
||||
<button type="button" class="blue link f8 fw4 tracked-1 mr1 pl3 pr4 br b--lightgrey hover-darkgrey" {{on "click" (action "togglePostPreviewModal")}}>Preview {{this.post.displayName}}</button>
|
||||
{{/if}}
|
||||
|
||||
{{#if this.session.user.isContributor}}
|
||||
<GhTaskButton @buttonText="Save"
|
||||
@task={{this.save}}
|
||||
|
|
Loading…
Add table
Reference in a new issue