xaviershay/enki — pull request #73 by mcary (2013-03-27 13:21:01+00:00)
Title: Allow draft posts by special-casing blank published_at_natural

I like to revise a post a couple of times before publishing it.
Sometimes there are glitches to work out in the presentation, like
linking to files that are attached to the post or refining a stylesheet
to accomodate a post with intricate presentational components. Also, I
like to write the post right in the admin UI rather than locally in a
text editor so I can see a faithful preview. And I often don't write a
post all in one sitting.

Currently, there is no way to save a post with a nil published_at date.
The default published_at_natural is 'now', and so when that is parsed,
the published_at date is always filled-in. As an author, the best I
can do is set a published_at into the future... but then I have a
deadline that I don't want!

The front-end code already seems to support nil published_at to mean a
draft post.

Add handling of nil published_at on the admin side, and just a bit on
the public side:

* Default published_at_natural to '', meaning nil published_at
* Accomodate a nil published_at in various places in the admin UI
* Sort the admin posts index by updated_at if published_at is null
* Add the ability to set a published_at directly without setting
published_at_natural
* Handle the nil published_at in several places of the UI, including
preview, dashboard, and post editing
* Push checks for published_at into a link_to_post helper

Preserve the error message when an invalid published_at_natural is
entered.

---
Just wanted to acknowledge that according to your philosophy, this might not belong in the enki core. But I wanted to offer it because enki's front-end already mostly has support for this, so I got the impression that the feature used to exist in the past in a more complete way.