Ghost/ghost/admin/app/templates/components/gh-publishmenu-draft.hbs

66 lines
3.5 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 (and this.feature.labs.members (eq this.post.displayName "post"))}}
<div class="gh-publishmenu-radio">
{{#if this.backgroundLoader.isRunning}}
<div class="gh-loading-spinner" style="zoom: 50%"></div>
{{else}}
{{#unless this.deliveredAction}}
<div class="for-checkbox {{if disableEmailOption "pe-none"}}">
<div class="checkbox" for="email-when-published-checkbox">
<Input @checked={{this.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox" @name="email-when-published" @disabled={{disableEmailOption}} />
<span
class="input-toggle-component gh-publishmenu-email-checkbox"
{{on "click" (toggle "sendEmailWhenPublished" this)}}
></span>
</div>
</div>
<div class="gh-publishmenu-email-label">
<label class="gh-publishmenu-radio-label" for="email-when-published-checkbox">Email post</label>
{{#if this.memberCount}}
<div class="gh-publishmenu-radio-desc">Send post to {{this.memberCount}} members when published</div>
{{else}}
<div class="gh-publishmenu-radio-desc">You have 0 members</div>
{{/if}}
</div>
{{/unless}}
{{/if}}
</div>
{{#unless this.deliveredAction}}
<div class="gh-publishmenu-preview-button">
<button type="button" class="gh-btn gh-btn-link gh-preview-email-button" onclick={{action "toggleEmailPreviewModal"}}
data-test-button="toggle-email-preview">
<span class="blue">
Preview in browser
</span>
</button>
</div>
{{/unless}}
{{/if}}
</section>