mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
89f9516f04
refs https://github.com/TryGhost/Team/issues/1390 - added `membersTimeFilters` feature flag and labs toggle - added `<GhDatePicker>` component that lifts functionality from the `<GhDateTimePicker>` component - `<GhDateTimePicker>` has not yet been refactored to use the new component internally as there are some odd/complex interactions with error handling with it's existing use-cases and they are in critical publishing paths so the refactor doesn't belong as part of this change - added "Created at" filter type to members filters - uses new date picker component for input value - has "before", "on or before", "after", "on or after" operators - "on" and "not on" operators were skipped as they require two NQL statements to represent, breaking the current 1:1 statement:filter approach used in the NQL-based query param parsing
75 lines
4.0 KiB
Handlebars
75 lines
4.0 KiB
Handlebars
<div ...attributes>
|
|
<header class="gh-publishmenu-heading">Ready to
|
|
{{#if @canSendEmail}}
|
|
<GhDistributionActionSelect
|
|
@distributionAction={{@distributionAction}}
|
|
@setDistributionAction={{@setDistributionAction}}
|
|
/>
|
|
{{else}}
|
|
publish
|
|
{{/if}}
|
|
this {{@post.displayName}}?
|
|
</header>
|
|
<section class="gh-publishmenu-content {{if this.disableEmailOption "no-border"}}">
|
|
<div class="gh-publishmenu-section">
|
|
<div class="gh-publishmenu-radio {{if (eq @saveType "publish") "active"}}" {{on "click" (fn this.setSaveType "publish")}}>
|
|
<div class="gh-publishmenu-radio-button" data-test-publishmenu-published-option></div>
|
|
<div class="gh-publishmenu-radio-content">
|
|
<div class="gh-publishmenu-radio-label">{{#if @emailOnly}}Send email now{{else}}Set it live now{{/if}}</div>
|
|
<div class="gh-publishmenu-radio-desc">{{#if @emailOnly}}Deliver this immediately{{else}}Publish this {{@post.displayName}} immediately{{/if}}</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 it for later</div>
|
|
<GhDateTimePicker
|
|
@date={{@post.publishedAtBlogDate}}
|
|
@time={{@post.publishedAtBlogTime}}
|
|
@setDate={{this.setDate}}
|
|
@setTime={{this.setTime}}
|
|
@onDateError={{this.dateInputDidError}}
|
|
@onTimeError={{this.timeInputDidError}}
|
|
@setTypedDateError={{@setTypedDateError}}
|
|
@errors={{@post.errors}}
|
|
@dateErrorProperty="publishedAtBlogDate"
|
|
@timeErrorProperty="publishedAtBlogTime"
|
|
@minDate={{this._minDate}}
|
|
@isActive={{eq @saveType "schedule"}}
|
|
/>
|
|
<div class="gh-publishmenu-radio-desc">{{#if @emailOnly}}Send email at a specific time{{else}}Set automatic future publish date{{/if}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{#if this.showEmailSection}}
|
|
<div class="gh-publishmenu-section {{if @isSendingEmailLimited "no-border"}}" {{did-insert (perform this.countTotalMembersTask)}}>
|
|
<div class="gh-publishmenu-email">
|
|
{{#if @isSendingEmailLimited}}
|
|
<p class="gh-box gh-box-alert">{{html-safe @sendingEmailLimitError}}</p>
|
|
{{else}}
|
|
<div class="gh-publishmenu-email-label">
|
|
<label class="gh-publishmenu-radio-label mb3">Send by email to</label>
|
|
|
|
{{#if this.disableEmailOption}}
|
|
<p class="gh-box gh-content-box">
|
|
<LinkTo @route="members">
|
|
Add members
|
|
</LinkTo>
|
|
to start sending newsletters!
|
|
</p>
|
|
{{else}}
|
|
<div class="form-group">
|
|
<GhMembersRecipientSelect
|
|
@filter={{@recipientsFilter}}
|
|
@onChange={{@setSendEmailWhenPublished}}
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</section>
|
|
</div> |