mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
3a11faf0b6
refs https://github.com/TryGhost/Team/issues/1596 This commit updates admin to align with the changes in the backend in https://github.com/TryGhost/Ghost/pull/14798 - `post.email_recipient_filter` option and property is renamed to `email_segment` - `newsletter_id` option is renamed to `newsletter` (and now uses slug instead of id) - Sending a post via email, means you need to set the `newsletter` option. The `email_segment` option is optional now and defaults to `all`. Not setting `newsletter` means not sending an email, setting `email_segment` is ignored if `newsletter` is missing. - We can no longer use `email_recipient_filter` (now renamed to `email_segment`) to know whether a post is published/scheduled to be sent as an email. We need to rely on the newsletter relation now. The `email_segment` `none` value has been dropped and will be `all` even if no email will be sent (newsletter will be null). - `sendEmailWhenPublished` option is no longer supported in the backend.
39 lines
1.7 KiB
Handlebars
39 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.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>
|