mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 09:22:49 +03:00
756f5094b4
refs https://github.com/TryGhost/Team/issues/1597 - added "Save" button to editor for scheduled and published posts when any edits have been made - shows "Saving..." then "Saved" for 3 seconds before disappearing - replaces "Saving..." indicator shown in status bar on the left - added `showIcon` argument to `<GhTaskButton>` so it can be used for text style buttons - changed editor status behaviour to only show "Scheduled" by default with the full text shown on hover
38 lines
1.7 KiB
Handlebars
38 lines
1.7 KiB
Handlebars
<div role="tooltip" {{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}}
|
|
Sent 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.emailRecipientFilter}} />
|
|
{{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.emailRecipientFilter (not @post.email))}}
|
|
and sent to <GhRecipientFilterCount @filter={{@post.emailRecipientFilter}} />
|
|
{{/if}}
|
|
{{this.scheduledTime}}
|
|
{{/if}}
|
|
</time>
|
|
{{else if @post.isNew}}
|
|
New
|
|
{{else}}
|
|
Draft
|
|
{{unless @hasDirtyAttributes "- Saved"}}
|
|
{{/if}}
|
|
</div> |