Ghost/ghost/admin/app/components/editor/modals/publish-flow/complete.hbs
Peter Zimon 7e3e4bd36b Fixed number formatting in Publish menu
no refs.

- number formatting (ie. thousands indicators) were missing in a couple of places in the Publish menu
2022-09-16 19:36:39 +02:00

112 lines
4.1 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{#let @publishOptions.post as |post|}}
<div class="gh-publish-title" data-test-publish-flow="complete" data-test-complete-title>
{{#if post.isScheduled}}
<span class="green">All set!</span>
Your {{if post.emailOnly "email" post.displayName}} will be
{{#if post.emailOnly}}
sent
{{else if post.willEmail}}
published and sent
{{else}}
published
{{/if}}
{{#let (moment-site-tz post.publishedAtUTC) as |scheduledAt|}}
{{#if (is-moment-today scheduledAt)}}
today
{{else}}
on {{moment-format scheduledAt "MMMM Do"}}
{{/if}}
at {{moment-format scheduledAt "HH:mm"}}.
{{/let}}
{{else}}
<span class="green">Boom. Its out there.</span>
{{#if post.emailOnly}}
Your email has been sent.
{{else if (and post.isPost @postCount)}}
Thats {{format-number @postCount}} {{gh-pluralize @postCount "post" without-count=true}} published, keep going!
{{else}}
Your {{post.displayName}} has been published.
{{/if}}
{{/if}}
</div>
{{#if post.emailOnly}}
<div class="gh-publish-confirmation" data-test-complete-details>
<p>
Your post
{{if post.isScheduled "will be" "was"}}
sent to
{{#let (members-count-fetcher query=(hash filter=post.fullRecipientFilter)) as |countFetcher|}}
<strong>
{{if (eq @recipientType "all") "all"}}
{{format-number countFetcher.count}}
{{!-- @recipientType = free/paid/all/specific --}}
{{if (not-eq @recipientType "all") @recipientType}}
{{gh-pluralize countFetcher.count "subscriber" without-count=true}}
</strong>
{{#unless @publishOptions.onlyDefaultNewsletter}}
of <strong>{{@publishOptions.newsletter.name}}</strong>{{if post.isScheduled "," "."}}
{{/unless}}
{{/let}}
{{#let (moment-site-tz post.publishedAtUTC) as |publishedAt|}}
on
{{moment-format publishedAt "D MMM YYYY"}}
at
{{moment-format publishedAt "HH:mm"}}.
{{/let}}
</p>
{{#if post.isScheduled}}
<p>
Need to make a change?
<button
type="button"
class="gh-revert-to-draft"
{{on "click" (fn @close (hash afterTask="revertToDraftTask"))}}
>
<span>Unschedule and revert to draft &rarr;</span>
</button>
</p>
{{/if}}
</div>
{{else}}
<a href={{post.url}} class="gh-post-bookmark-wrapper" target="_blank" rel="noopener noreferrer" data-test-complete-bookmark>
<GhPostBookmark @post={{post}} />
</a>
{{#if post.isScheduled}}
<p class="gh-publish-confirmation">
Need to make a change?
<button
type="button"
class="gh-revert-to-draft"
{{on "click" (fn @close (hash afterTask="revertToDraftTask"))}}
data-test-button="revert-to-draft"
>
<span>Unschedule and revert to draft &rarr;</span>
</button>
</p>
{{else}}
<p class="gh-publish-confirmation">
<button
type="button"
class="gh-back-to-editor"
{{on "click" @close}}
data-test-button="back-to-editor"
>
<span>Back to editor</span>
</button>
</p>
{{/if}}
{{/if}}
{{/let}}