mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
1f5f9645e6
refs https://github.com/TryGhost/Team/issues/1576 - Passes the selected newsletter to the recipient selector - Added a `recipientFilter` getter to the newsletter model to make changes easier in the future - Updates the `fullRecipientFilter` in the new publishing flow to use the newsletter's recipientFilter - Already takes future paid only newsletters into account - The counts in the status message after publishing is not updated yet (requires https://github.com/TryGhost/Team/issues/1569) - The counts in the scheduled notification is not updated yet (requires https://github.com/TryGhost/Team/issues/1569)
73 lines
4.0 KiB
Handlebars
73 lines
4.0 KiB
Handlebars
<div data-test-publishmenu-scheduled="true" ...attributes>
|
|
<header class="gh-publishmenu-heading" data-test-publishmenu-header>Will be {{if @emailOnly "sent" "published"}} in {{this.timeToPublished}}</header>
|
|
<div class="gh-publishmenu-content">
|
|
<section class="gh-publishmenu-section">
|
|
<div class="gh-publishmenu-radio {{if (eq @saveType "draft") "active"}}" {{on "click" (fn this.setSaveType "draft")}}>
|
|
<div class="gh-publishmenu-radio-button" data-test-publishmenu-draft-option></div>
|
|
<div class="gh-publishmenu-radio-content">
|
|
<div class="gh-publishmenu-radio-label">Revert to draft</div>
|
|
<div class="gh-publishmenu-radio-desc">Do not publish</div>
|
|
</div>
|
|
</div>
|
|
<div class="gh-publishmenu-radio {{if (eq @saveType "schedule") "active"}}" {{on "click" (fn this.setSaveType "schedule")}}>
|
|
<div class="gh-publishmenu-radio-button" data-test-publishmenu-scheduled-option></div>
|
|
<div class="gh-publishmenu-radio-content">
|
|
<div class="gh-publishmenu-radio-label">Schedule for later</div>
|
|
<GhDateTimePicker
|
|
@date={{@post.publishedAtBlogDate}}
|
|
@time={{@post.publishedAtBlogTime}}
|
|
@setDate={{this.setDate}}
|
|
@setTime={{this.setTime}}
|
|
@setTypedDateError={{@setTypedDateError}}
|
|
@errors={{@post.errors}}
|
|
@dateErrorProperty="publishedAtBlogDate"
|
|
@timeErrorProperty="publishedAtBlogTime"
|
|
@minDate={{this.minDate}}
|
|
@isActive={{eq @saveType "schedule"}}
|
|
/>
|
|
<div class="gh-publishmenu-radio-desc">Set automatic future publish date</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{#if @canSendEmail}}
|
|
<section class="gh-publishmenu-section">
|
|
<div class="gh-publishmenu-email">
|
|
{{#if @isSendingEmailLimited}}
|
|
<p>{{html-safe @sendingEmailLimitError}}</p>
|
|
{{else}}
|
|
<div class="gh-publishmenu-email-label pe-none">
|
|
<label class="gh-publishmenu-radio-label mb3 midgrey">Send by email to</label>
|
|
|
|
{{#if (and (feature "multipleNewsletters") (gt @availableNewsletters.length 1))}}
|
|
<div class="mb3">
|
|
<PowerSelect
|
|
@selected={{this.selectedNewsletter}}
|
|
@options={{@availableNewsletters}}
|
|
@onChange={{noop}}
|
|
@triggerComponent="gh-power-select/trigger"
|
|
@triggerClass="gh-publishmenu-newsletter-trigger disabled"
|
|
@dropdownClass="gh-publishmenu-newsletter-dropdown"
|
|
@renderInPlace={{true}}
|
|
@disabled={{true}}
|
|
as |newsletter|
|
|
>
|
|
{{newsletter.name}}
|
|
</PowerSelect>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="form-group">
|
|
<GhMembersRecipientSelect
|
|
@filter={{@recipientsFilter}}
|
|
@newsletter={{this.selectedNewsletter}}
|
|
@disabled={{true}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</section>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|