0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Removed email publish options when email is disabled, added message if already emailed

no issue

- when email is unavailable (members/email disabled, already emailed, publishing a page) don't show any email options in the publish flow so there's no confusion and a cleaner options list
- if a post has already been emailed indicate that with a "Already sent as email" when only one newsletter exists or "Already sent to {newlsetter name}" when multiple exist
This commit is contained in:
Kevin Ansfield 2022-05-11 09:33:26 +01:00
parent 8652f16005
commit 46f01c2d8f

View file

@ -29,6 +29,7 @@
{{/liquid-if}}
</div>
{{#unless @publishOptions.emailUnavailable}}
<div class="gh-publish-setting">
{{#if @publishOptions.willEmail}}
<button type="button" class="gh-publish-setting-title {{if (eq @publishOptions.publishType "publish") "disabled"}}" {{on "click" (fn this.toggleSection "emailRecipients")}}>
@ -79,6 +80,22 @@
</div>
{{/liquid-if}}
</div>
{{/unless}}
{{#if @publishOptions.post.email}}
<div class="gh-publish-setting">
<div class="gh-publish-setting-title disabled">
{{svg-jar "member"}}
<div class="gh-publish-setting-trigger">
{{#if @publishOptions.onlyDefaultNewsletter}}
Already sent as email
{{else}}
Already sent to {{@publishOptions.post.newsletter.name}}
{{/if}}
</div>
</div>
</div>
{{/if}}
<div class="gh-publish-setting last">
<button type="button" class="gh-publish-setting-title" {{on "click" (fn this.toggleSection "publishAt")}}>