Ghost/ghost/admin/app/components/gh-publishmenu-scheduled.hbs
Kevin Ansfield 09435ecf76 Co-located component template files
no issue

Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories.

- ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components
- manually moved in-repo-addon component templates in `lib/koenig-editor`
- removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them
- updated `.embercli` to default to new flat component structure
2020-05-18 13:14:08 +01:00

60 lines
3.4 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 showSendEmail}}
{{#unless this.post.email}}
<section class="gh-publishmenu-section">
<div class="gh-publishmenu-radio gh-publishmenu-email">
{{#if this.backgroundLoader.isRunning}}
<div class="gh-loading-spinner" style="zoom: 50%"></div>
{{else}}
<div class="gh-publishmenu-email-label">
<label class="gh-publishmenu-radio-label pe-none midgrey"
for="email-when-published-checkbox">Send by email</label>
{{#if (or this.memberCount this.session.user.isEditor)}}
<div class="gh-publishmenu-radio-desc">Deliver post to members</div>
{{else}}
<div class="gh-publishmenu-radio-desc">You haven't got any members</div>
{{/if}}
</div>
<div class="for-switch small pe-none">
<div class="switch container" for="email-when-published-checkbox">
<Input @checked={{this.post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox" @name="email-when-published" @disabled={{this.disableEmailOption}} />
<span class="input-toggle-component gh-publishmenu-email-checkbox"
{{on "click" (toggle "sendEmailWhenPublished" this)}}></span>
</div>
</div>
{{/if}}
</div>
</section>
{{/unless}}
{{/if}}
</div>