2022-06-01 15:48:33 +03:00
|
|
|
{{!-- template-lint-disable no-invalid-interactive --}}
|
|
|
|
<div {{on "mouseover" this.onMouseover}} {{on "mouseleave" this.onMouseleave}} data-test-editor-post-status ...attributes>
|
2022-05-10 12:04:14 +03:00
|
|
|
{{#if (and this.isSaving @post.isDraft)}}
|
2020-07-01 16:07:52 +03:00
|
|
|
Saving...
|
2021-10-25 17:17:02 +03:00
|
|
|
{{else if @post.isSent}}
|
2022-10-06 12:12:11 +03:00
|
|
|
{{#if @post.didEmailFail }}
|
2022-10-06 13:37:08 +03:00
|
|
|
<span class="newsletter-failed">Failed to send newsletter. </span>
|
|
|
|
<button
|
2022-10-06 12:12:11 +03:00
|
|
|
type="button"
|
2022-10-06 13:37:08 +03:00
|
|
|
class="gh-retry-trigger"
|
2022-10-06 12:12:11 +03:00
|
|
|
{{on "click" @publishManagement.openPublishFlow}}
|
|
|
|
disabled={{@publishManagement.publishOptions.isLoading}}
|
|
|
|
>
|
2022-10-06 13:37:08 +03:00
|
|
|
<span>Retry now</span>
|
2022-10-06 12:12:11 +03:00
|
|
|
</button>
|
|
|
|
{{else}}
|
|
|
|
<button type="button" {{on "click" @openUpdateFlow}} class="gh-editor-post-status-btn">Sent</button>
|
|
|
|
to {{gh-pluralize @post.email.emailCount "member"}}
|
|
|
|
{{/if}}
|
2021-12-07 12:37:49 +03:00
|
|
|
{{else if (and @post.emailOnly @post.isScheduled)}}
|
2022-05-10 12:04:14 +03:00
|
|
|
Scheduled
|
|
|
|
{{#if this.isHovered}}
|
2022-08-04 18:57:40 +03:00
|
|
|
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green-d1" data-test-schedule-countdown>
|
2022-05-10 15:58:22 +03:00
|
|
|
to be sent to <GhRecipientFilterCount @filter={{@post.fullRecipientFilter}} @newsletter={{@post.newsletter}} />
|
2022-05-10 12:04:14 +03:00
|
|
|
{{this.scheduledTime}}
|
|
|
|
</time>
|
|
|
|
{{/if}}
|
2020-07-01 16:07:52 +03:00
|
|
|
{{else if (or @post.isPublished @post.pastScheduledTime)}}
|
2023-09-22 12:54:51 +03:00
|
|
|
<a href={{@post.url}} class="view-post {{if (eq @post.email.status "failed") "newsletter-failed" ""}}" target="_blank" rel="noopener noreferrer">
|
|
|
|
Published
|
|
|
|
{{#unless @post.email}}
|
|
|
|
{{svg-jar "arrow-top-right" title="View post"}}
|
|
|
|
{{/unless}}
|
|
|
|
</a>
|
2020-07-01 16:07:52 +03:00
|
|
|
{{#if (or (eq @post.email.status "submitting") (eq @post.email.status "submitting"))}}
|
2020-08-10 13:16:03 +03:00
|
|
|
and sending to {{gh-pluralize @post.email.emailCount "member"}}
|
2020-07-01 16:07:52 +03:00
|
|
|
{{else if (eq @post.email.status "submitted")}}
|
2020-08-10 13:16:03 +03:00
|
|
|
and sent to {{gh-pluralize @post.email.emailCount "member"}}
|
2022-10-06 12:12:11 +03:00
|
|
|
{{else if (eq @post.email.status "failed")}}
|
2022-10-06 13:37:08 +03:00
|
|
|
<span class="newsletter-failed">
|
|
|
|
but failed to send newsletter.
|
|
|
|
</span>
|
|
|
|
<button
|
2022-10-06 12:12:11 +03:00
|
|
|
type="button"
|
2022-10-06 13:37:08 +03:00
|
|
|
class="gh-retry-trigger"
|
2022-10-06 12:12:11 +03:00
|
|
|
{{on "click" @publishManagement.openPublishFlow}}
|
|
|
|
disabled={{@publishManagement.publishOptions.isLoading}}
|
|
|
|
>
|
2023-01-30 17:57:50 +03:00
|
|
|
<span>View details</span>
|
2022-10-06 12:12:11 +03:00
|
|
|
</button>
|
2020-07-01 16:07:52 +03:00
|
|
|
{{/if}}
|
|
|
|
{{else if @post.isScheduled}}
|
2022-08-04 18:57:40 +03:00
|
|
|
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green-d1" data-test-schedule-countdown>
|
2022-05-10 12:04:14 +03:00
|
|
|
Scheduled
|
|
|
|
{{#if this.isHovered}}
|
|
|
|
to be published
|
2022-05-16 11:18:46 +03:00
|
|
|
{{#if (and @post.newsletter (not @post.email))}}
|
2022-05-10 15:58:22 +03:00
|
|
|
and sent to <GhRecipientFilterCount @filter={{@post.fullRecipientFilter}} @newsletter={{@post.newsletter}} />
|
2022-05-10 12:04:14 +03:00
|
|
|
{{/if}}
|
|
|
|
{{this.scheduledTime}}
|
2021-06-11 14:10:28 +03:00
|
|
|
{{/if}}
|
2019-11-13 17:31:42 +03:00
|
|
|
</time>
|
2020-07-01 16:07:52 +03:00
|
|
|
{{else if @post.isNew}}
|
|
|
|
New
|
2019-11-13 17:31:42 +03:00
|
|
|
{{else}}
|
2021-07-07 13:53:06 +03:00
|
|
|
Draft
|
2022-02-02 19:09:43 +03:00
|
|
|
{{unless @hasDirtyAttributes "- Saved"}}
|
2019-11-13 17:31:42 +03:00
|
|
|
{{/if}}
|
2022-05-10 15:13:39 +03:00
|
|
|
</div>
|