Ghost/ghost/admin/app/components/gh-publishmenu-scheduled.hbs
Kevin Ansfield 0642a8b3cc Fixed email segment selector counts not taking subscription status into account
refs https://github.com/TryGhost/Team/issues/496
refs https://github.com/TryGhost/Team/issues/581

- added ability to pass an enforced filter to the segment count component
- used the enforced filter to add `subscribed:true` to segment counts where we're counting the number of members that would receive an email
2021-05-07 12:04:01 +01:00

54 lines
2.7 KiB
Handlebars

<header class="gh-publishmenu-heading">Will be published in {{this.timeToPublished}}</header>
<div class="gh-publishmenu-content">
<section class="gh-publishmenu-section">
<div class="gh-publishmenu-radio {{if (eq this.saveType "draft") "active"}}" {{action "setSaveType" "draft" on="click"}}>
<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 this.saveType "schedule") "active"}}" {{action "setSaveType" "schedule" on="click"}}>
<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={{this.post.publishedAtBlogDate}}
@time={{this.post.publishedAtBlogTime}}
@setDate={{action "setDate"}}
@setTime={{action "setTime"}}
@setTypedDateError={{this.setTypedDateError}}
@errors={{this.post.errors}}
@dateErrorProperty="publishedAtBlogDate"
@timeErrorProperty="publishedAtBlogTime"
@minDate={{this._minDate}}
@isActive={{eq this.saveType "schedule"}}
/>
<div class="gh-publishmenu-radio-desc">Set automatic future publish date</div>
</div>
</div>
</section>
{{#if this.canSendEmail}}
<section class="gh-publishmenu-section">
<div class="gh-publishmenu-email">
{{#if this.isSendingEmailLimited}}
<p>{{html-safe this.sendingEmailLimitError}}</p>
{{else}}
<div class="gh-publishmenu-email-label {{if this.disableEmailOption "pe-none"}}">
<label class="gh-publishmenu-radio-label mb3 {{if this.disableEmailOption "midgrey"}}">Send by email to</label>
<div class="form-group">
<GhMembersSegmentSelect
@segment={{this.recipientsSegment}}
@disabled={{true}}
@renderInPlace={{true}}
@enforcedCountFilter="subscribed:true"
/>
</div>
</div>
{{/if}}
</div>
</section>
{{/if}}
</div>