mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added newsletter name to publish update flow copy
no issue - show the newsletter a post was/will be sent to if there's more than just the default newsletter or the newsletter that was emailed is now archived
This commit is contained in:
parent
1349a03164
commit
cc8dd9dedf
2 changed files with 38 additions and 8 deletions
|
@ -19,12 +19,17 @@
|
||||||
|
|
||||||
<div class="gh-publish-confirmation">
|
<div class="gh-publish-confirmation">
|
||||||
<p>
|
<p>
|
||||||
Your
|
Your
|
||||||
{{post.displayName}}
|
{{post.displayName}}
|
||||||
|
|
||||||
{{if post.isScheduled "will be" "was"}}
|
{{if post.isScheduled "will be" "was"}}
|
||||||
|
|
||||||
{{#if (or post.isSent (and post.isPublished post.email) (and post.isScheduled post.emailRecipientFilter (not post.email)))}}
|
{{#if
|
||||||
|
(or post.isSent
|
||||||
|
(and post.isPublished post.email)
|
||||||
|
(and post.isScheduled post.emailRecipientFilter (not post.email))
|
||||||
|
)
|
||||||
|
}}
|
||||||
{{#if post.emailOnly}}
|
{{#if post.emailOnly}}
|
||||||
sent to
|
sent to
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -33,25 +38,39 @@
|
||||||
|
|
||||||
{{#if post.isScheduled}}
|
{{#if post.isScheduled}}
|
||||||
{{#let (members-count-fetcher query=(hash filter=post.fullRecipientFilter)) as |countFetcher|}}
|
{{#let (members-count-fetcher query=(hash filter=post.fullRecipientFilter)) as |countFetcher|}}
|
||||||
<strong>{{gh-pluralize countFetcher.count "member"}}</strong>
|
{{#if this.showNewsletterName}}
|
||||||
|
<strong>{{gh-pluralize countFetcher.count "subscriber"}}</strong> of <strong>{{post.newsletter.name}}</strong>
|
||||||
|
{{else}}
|
||||||
|
<strong>{{gh-pluralize countFetcher.count "member"}}</strong>
|
||||||
|
{{/if}}
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<strong>{{pluralize post.email.emailCount "member"}}</strong>
|
{{#if this.showNewsletterName}}
|
||||||
|
<strong>{{gh-pluralize post.email.emailCount "subscriber"}}</strong> of <strong>{{post.newsletter.name}}</strong>
|
||||||
|
{{else}}
|
||||||
|
<strong>{{gh-pluralize post.email.emailCount "member"}}</strong>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
published on your site
|
published on your site
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#let (moment-site-tz post.publishedAtUTC) as |publishedAt|}}
|
{{#let (moment-site-tz post.publishedAtUTC) as |publishedAt|}}
|
||||||
on
|
on
|
||||||
{{moment-format publishedAt "D MMM YYYY"}}
|
{{moment-format publishedAt "D MMM YYYY"}}
|
||||||
at
|
at
|
||||||
{{moment-format publishedAt "HH:mm"}}.
|
{{moment-format publishedAt "HH:mm"}}.
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
|
||||||
{{#if post.isScheduled}}
|
{{#if post.isScheduled}}
|
||||||
{{#if (and post.isScheduled post.email)}}
|
{{#if (and post.isScheduled post.email)}}
|
||||||
This post was previously emailed to
|
This post was previously emailed to
|
||||||
<strong>{{pluralize post.email.emailCount "member"}}</strong> on
|
|
||||||
|
{{#if this.showNewsletterName}}
|
||||||
|
<strong>{{pluralize post.email.emailCount "subscriber"}}</strong> of <strong>{{post.newsletter.name}}</strong> on
|
||||||
|
{{else}}
|
||||||
|
<strong>{{pluralize post.email.emailCount "member"}}</strong> on
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#let (moment-site-tz post.email.createdAtUTC) as |sentAt|}}
|
{{#let (moment-site-tz post.email.createdAtUTC) as |sentAt|}}
|
||||||
{{moment-format sentAt "D MMM YYYY"}}
|
{{moment-format sentAt "D MMM YYYY"}}
|
||||||
|
@ -59,6 +78,7 @@
|
||||||
{{moment-format sentAt "HH:mm"}}.
|
{{moment-format sentAt "HH:mm"}}.
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
Need to make a change?
|
Need to make a change?
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -8,6 +8,16 @@ export default class UpdateFlowModalComponent extends Component {
|
||||||
ignoreBackdropClick: true
|
ignoreBackdropClick: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// We only show the newsletter name in the app if there's more than the single default newsletter.
|
||||||
|
// However, here we can show historic email data so it could have been sent to a now-archived
|
||||||
|
// newsletter in which case we want to force display of the newsletter name to avoid confusion.
|
||||||
|
get showNewsletterName() {
|
||||||
|
const {publishOptions} = this.args.data;
|
||||||
|
|
||||||
|
return !publishOptions.onlyDefaultNewsletter
|
||||||
|
|| publishOptions.post.newsletter?.status === 'archived';
|
||||||
|
}
|
||||||
|
|
||||||
@task
|
@task
|
||||||
*saveTask() {
|
*saveTask() {
|
||||||
yield this.args.data.saveTask.perform();
|
yield this.args.data.saveTask.perform();
|
||||||
|
|
Loading…
Add table
Reference in a new issue