mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 01:03:23 +03:00
e1dfe3edb0
no issue - renamed "Update" to "Unpublish" or "Unschedule" to match the available actions - renamed "Save" to "Update" and made it always visible but disabled when there are no unsaved changes - switched <Editor::PublishManagement> to a provider component and extracted `<Editor::PublishButtons>` - allows for the management flow to wrap other UI elements and have the yielded actions passed down so the publish/update flow can be opened from more than just the publish/unschedule/unpublish buttons - added link to "Sent" in editor status that opens the update flow for email-only posts Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
41 lines
1.9 KiB
Handlebars
41 lines
1.9 KiB
Handlebars
{{!-- template-lint-disable no-invalid-interactive --}}
|
|
<div {{on "mouseover" this.onMouseover}} {{on "mouseleave" this.onMouseleave}} data-test-editor-post-status ...attributes>
|
|
{{#if (and this.isSaving @post.isDraft)}}
|
|
Saving...
|
|
{{else if @post.isSent}}
|
|
<button type="button" {{on "click" @openUpdateFlow}} class="gh-editor-post-status-btn">Sent</button>
|
|
to {{gh-pluralize @post.email.emailCount "member"}}
|
|
{{else if (and @post.emailOnly @post.isScheduled)}}
|
|
Scheduled
|
|
{{#if this.isHovered}}
|
|
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green f8" data-test-schedule-countdown>
|
|
to be sent to <GhRecipientFilterCount @filter={{@post.fullRecipientFilter}} @newsletter={{@post.newsletter}} />
|
|
{{this.scheduledTime}}
|
|
</time>
|
|
{{/if}}
|
|
{{else if (or @post.isPublished @post.pastScheduledTime)}}
|
|
Published
|
|
{{#if (or (eq @post.email.status "submitting") (eq @post.email.status "submitting"))}}
|
|
and sending to {{gh-pluralize @post.email.emailCount "member"}}
|
|
{{else if (eq @post.email.status "submitted")}}
|
|
and sent to {{gh-pluralize @post.email.emailCount "member"}}
|
|
{{/if}}
|
|
{{else if @post.isScheduled}}
|
|
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green f8" data-test-schedule-countdown>
|
|
Scheduled
|
|
{{#if this.isHovered}}
|
|
to be published
|
|
{{#if (and @post.newsletter (not @post.email))}}
|
|
and sent to <GhRecipientFilterCount @filter={{@post.fullRecipientFilter}} @newsletter={{@post.newsletter}} />
|
|
{{/if}}
|
|
{{this.scheduledTime}}
|
|
{{/if}}
|
|
</time>
|
|
{{else if @post.isNew}}
|
|
New
|
|
{{else}}
|
|
Draft
|
|
{{unless @hasDirtyAttributes "- Saved"}}
|
|
{{/if}}
|
|
</div>
|