Ghost/ghost/admin/app/components/gh-editor-post-status.hbs
Kevin Ansfield 937eac51ad Fixed "and sent to..." text appearing in scheduled header when not sending
refs bd60c8089b

- added conditional for displaying the recipient text
- fixed tests not expecting newlines in html
2021-06-11 12:10:28 +01:00

24 lines
952 B
Handlebars

<div data-test-editor-post-status ...attributes>
{{#if this.isSaving}}
Saving...
{{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>
Will be published
{{#if @post.emailRecipientFilter}}
and sent to <GhRecipientFilterCount @filter={{@post.emailRecipientFilter}} />
{{/if}}
{{this.scheduledTime}}
</time>
{{else if @post.isNew}}
New
{{else}}
Draft
{{/if}}
</div>