mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
35cf6c9829
closes https://github.com/TryGhost/Ghost/issues/8249 - replaces the old split-button publish/schedule/update button with a less confusing menu system - adds a `{{gh-date-time-picker}}` component that contains a datepicker with separate time input - replaces the date text input in the post settings menu with `{{gh-date-time-picker}}` - disabled when post is scheduled, only way to update a scheduled time is via the publish menu - validates date is in the past when draft/published so there's no confusion with scheduling - displays saving status in top-left of editor screen - refactor editor (auto)saving processes to use ember-concurrency Other minor changes: - adds `post.publishedAtBlog{TZ,Date,Time}` properties to Post model to allow working with `publishedAt` datetime in the selected blog timezone rather than UTC - adds a `beforeSave` hook to `validation-engine` that is called after successful validation and before the Ember Data save call is made - adds validation of `publishedAtBlog{Date,Time}` to post validator - prevent gh-task-button showing last task state on first render - fixes bug where clicking into and out of the published date input in the PSM without making any changes saves a published date for draft posts
18 lines
1022 B
Handlebars
18 lines
1022 B
Handlebars
<header class="gh-publishmenu-heading">Update post status</header>
|
|
<section class="gh-publishmenu-content">
|
|
<div class="gh-publishmenu-radio {{if (eq saveType "draft") "active"}}" {{action setSaveType "draft" on="click"}}>
|
|
<div class="gh-publishmenu-radio-button" data-test-publishmenu-unpublished-option></div>
|
|
<div class="gh-publishmenu-radio-content">
|
|
<div class="gh-publishmenu-radio-label">Unpublished</div>
|
|
<div class="gh-publishmenu-radio-desc">Revert this post to a private draft</div>
|
|
</div>
|
|
</div>
|
|
<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">Published</div>
|
|
<div class="gh-publishmenu-radio-desc">Display this post publicly</div>
|
|
</div>
|
|
</div>
|
|
</section>
|