Ghost/ghost/admin/app/templates/components/gh-publishmenu-draft.hbs
2019-11-04 16:13:18 +07:00

57 lines
2.9 KiB
Handlebars

<header class="gh-publishmenu-heading">Ready to publish your {{post.displayName}}?</header>
<section class="gh-publishmenu-content">
<div class="gh-publishmenu-radio {{if (eq saveType "publish") "active"}}" {{action "setSaveType" "publish" on="click"}}>
<div class="gh-publishmenu-radio-button" data-test-publishmenu-published-option></div>
<div class="gh-publishmenu-radio-content">
<div class="gh-publishmenu-radio-label">Set it live now</div>
<div class="gh-publishmenu-radio-desc">Publish this {{post.displayName}} immediately</div>
</div>
</div>
<div class="gh-publishmenu-radio {{if (eq 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 it for later</div>
{{gh-date-time-picker
date=post.publishedAtBlogDate
time=post.publishedAtBlogTime
setDate=(action "setDate")
setTime=(action "setTime")
errors=post.errors
dateErrorProperty="publishedAtBlogDate"
timeErrorProperty="publishedAtBlogTime"
minDate=_minDate
}}
<div class="gh-publishmenu-radio-desc">Set automatic future publish date</div>
</div>
</div>
{{#if this.feature.labs.members}}
<div class="flex mb4 justify-center">
{{#if this.backgroundLoader.isRunning}}
<div class="gh-loading-spinner" style="zoom: 50%"></div>
{{else}}
{{#if this.deliveredAction}}
<div class="mr3">
💌
</div>
<div class="flex-grow-1">
<div class="gh-publishmenu-radio-label">Sent</div>
<div class="gh-publishmenu-radio-desc">Post was sent {{gh-format-post-time this.deliveredAction.createdAtUTC}}</div>
</div>
{{else}}
<div class="for-switch mr3">
<label class="switch" for="email-when-published-checkbox">
<Input @checked={{this.post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox" @name="email-when-published" />
<span class="input-toggle-component"></span>
</label>
</div>
<div class="flex-grow-1">
<div class="gh-publishmenu-radio-label">Email post</div>
<div class="gh-publishmenu-radio-desc">Send post to 56 members when published</div>
</div>
{{/if}}
{{/if}}
</div>
{{/if}}
</section>