diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-07-04 11:46:13 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-07-04 11:46:13 -0400 |
commit | e11dedec034c4180985adf4a9f176b07121f0a41 (patch) | |
tree | 7f4320d562f37775cbc8ae390540da03a2d92d77 /app/views/admin/blogs/_form.html.haml | |
parent | d48adb741c5c30ba3f2d3c039a7e342b43add352 (diff) | |
download | thoughts-e11dedec034c4180985adf4a9f176b07121f0a41.tar.gz thoughts-e11dedec034c4180985adf4a9f176b07121f0a41.tar.bz2 thoughts-e11dedec034c4180985adf4a9f176b07121f0a41.zip |
Blog drafts no longer require slugs
They do still technically require titles, but the engine will fill in "Untitled draft" if it is left blank. Unpublished posts can be viewed at a different URL than published posts would be. Quick links to view published and unpublished posts have been added to the admin panel. refs #1
Diffstat (limited to 'app/views/admin/blogs/_form.html.haml')
-rw-r--r-- | app/views/admin/blogs/_form.html.haml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index 2066aed..12f7a82 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml | |||
@@ -15,6 +15,12 @@ | |||
15 | %ul | 15 | %ul |
16 | - f.object.errors.full_messages.each do |error| | 16 | - f.object.errors.full_messages.each do |error| |
17 | %li= error | 17 | %li= error |
18 | - unless f.object.new_record? | ||
19 | #entry-preview-link.details-module | ||
20 | - if f.object.published | ||
21 | = link_to "View post", blog_url(f.object.slug_was), target: "entry-preview" | ||
22 | - else | ||
23 | = link_to "Preview post", admin_blog_url(f.object), target: "entry-preview" | ||
18 | .details-module | 24 | .details-module |
19 | .published-field | 25 | .published-field |
20 | = f.check_box :published | 26 | = f.check_box :published |