2022-05-11 19:00:20 +03:00
|
|
|
<div class="form-group max-width mb0">
|
2022-05-12 14:56:43 +03:00
|
|
|
<GhMembersRecipientSelect
|
|
|
|
@filter={{@publishOptions.recipientFilter}}
|
|
|
|
@newsletter={{@publishOptions.newsletter}}
|
|
|
|
@onChange={{@publishOptions.setRecipientFilter}}
|
|
|
|
@renderInPlace={{false}}
|
|
|
|
@dropdownClass="gh-publish-newsletter-dropdown"
|
|
|
|
/>
|
2022-05-18 15:58:19 +03:00
|
|
|
|
2022-05-11 19:00:20 +03:00
|
|
|
{{#if (gt @publishOptions.newsletters.length 1)}}
|
2022-06-01 00:59:12 +03:00
|
|
|
<div class="mt4" data-test-select="newsletter">
|
2022-05-12 14:56:43 +03:00
|
|
|
<label class="gh-main-section-header small bn">Newsletter</label>
|
2022-05-11 19:00:20 +03:00
|
|
|
<PowerSelect
|
|
|
|
@selected={{@publishOptions.newsletter}}
|
|
|
|
@options={{@publishOptions.newsletters}}
|
|
|
|
@onChange={{@publishOptions.setNewsletter}}
|
2022-09-24 18:00:05 +03:00
|
|
|
@triggerComponent={{component "gh-power-select/trigger"}}
|
2022-05-11 19:00:20 +03:00
|
|
|
@triggerClass="gh-publish-newsletter-trigger"
|
|
|
|
@dropdownClass="gh-publish-newsletter-dropdown"
|
|
|
|
as |newsletter|
|
|
|
|
>
|
2022-06-01 00:59:12 +03:00
|
|
|
<span data-test-select-option={{newsletter.name}}>{{newsletter.name}}</span>
|
2022-05-18 15:58:19 +03:00
|
|
|
{{!-- TODO: remove conditional when author/editor can fetch member counts --}}
|
|
|
|
{{#if @publishOptions.user.isAdmin}}
|
|
|
|
<span class="gh-newsletter-count">{{format-number newsletter.count.members}}</span>
|
|
|
|
{{/if}}
|
2022-05-11 19:00:20 +03:00
|
|
|
</PowerSelect>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|