diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/admin/blogs/_form.html.haml | 4 | ||||
| -rw-r--r-- | app/views/admin/blogs/drafts.html.haml | 10 | ||||
| -rw-r--r-- | app/views/admin/blogs/index.html.haml | 4 | ||||
| -rw-r--r-- | app/views/blogs/show.html.haml | 2 | ||||
| -rw-r--r-- | app/views/layouts/admin.html.haml | 1 |
5 files changed, 18 insertions, 3 deletions
| diff --git a/app/views/admin/blogs/_form.html.haml b/app/views/admin/blogs/_form.html.haml index 4a1c410..2066aed 100644 --- a/app/views/admin/blogs/_form.html.haml +++ b/app/views/admin/blogs/_form.html.haml | |||
| @@ -16,6 +16,10 @@ | |||
| 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 | .details-module | 18 | .details-module |
| 19 | .published-field | ||
| 20 | = f.check_box :published | ||
| 21 | = f.label :published | ||
| 22 | .details-module | ||
| 19 | = f.fields_for :records, Record.new do |builder| | 23 | = f.fields_for :records, Record.new do |builder| |
| 20 | .should-create-record-field | 24 | .should-create-record-field |
| 21 | = builder.check_box :_destroy, {checked: false}, "0", "1" | 25 | = builder.check_box :_destroy, {checked: false}, "0", "1" |
| diff --git a/app/views/admin/blogs/drafts.html.haml b/app/views/admin/blogs/drafts.html.haml new file mode 100644 index 0000000..91d3214 --- /dev/null +++ b/app/views/admin/blogs/drafts.html.haml | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | %table#entries | ||
| 2 | %tr | ||
| 3 | %th Title | ||
| 4 | %th Last updated | ||
| 5 | %th | ||
| 6 | - @blogs.each do |blog| | ||
| 7 | %tr{ class: cycle("even", "odd") } | ||
| 8 | %td= blog.title | ||
| 9 | %td= blog.updated_at.strftime("%B %d, %Y, %l:%M%P") | ||
| 10 | %td= link_to "Edit", edit_admin_blog_url(blog) | ||
| diff --git a/app/views/admin/blogs/index.html.haml b/app/views/admin/blogs/index.html.haml index 448617a..c5db4f1 100644 --- a/app/views/admin/blogs/index.html.haml +++ b/app/views/admin/blogs/index.html.haml | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | %table#entries | 1 | %table#entries |
| 2 | %tr | 2 | %tr |
| 3 | %th Title | 3 | %th Title |
| 4 | %th Date created | 4 | %th Date published |
| 5 | %th | 5 | %th |
| 6 | - @blogs.each do |blog| | 6 | - @blogs.each do |blog| |
| 7 | %tr{ class: cycle("even", "odd") } | 7 | %tr{ class: cycle("even", "odd") } |
| 8 | %td= blog.title | 8 | %td= blog.title |
| 9 | %td= blog.created_at.strftime("%B %d, %Y, %l:%M%P") | 9 | %td= blog.published_at.strftime("%B %d, %Y, %l:%M%P") |
| 10 | %td= link_to "Edit", edit_admin_blog_url(blog) | 10 | %td= link_to "Edit", edit_admin_blog_url(blog) |
| diff --git a/app/views/blogs/show.html.haml b/app/views/blogs/show.html.haml index c44d3f4..48c07dc 100644 --- a/app/views/blogs/show.html.haml +++ b/app/views/blogs/show.html.haml | |||
| @@ -3,4 +3,4 @@ | |||
| 3 | %footer#blog-footer | 3 | %footer#blog-footer |
| 4 | This entry was posted on | 4 | This entry was posted on |
| 5 | = succeed "." do | 5 | = succeed "." do |
| 6 | %time= @blog.created_at.strftime("%B #{@blog.created_at.day.ordinalize}, %Y at %-I:%M:%S%P") | 6 | %time= @blog.posted_at.strftime("%B #{@blog.posted_at.day.ordinalize}, %Y at %-I:%M:%S%P") |
| diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 68bbd96..cb48c50 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | = link_to "Blogs", admin_blogs_url, class: "major-link" | 24 | = link_to "Blogs", admin_blogs_url, class: "major-link" |
| 25 | %ul.minors | 25 | %ul.minors |
| 26 | %li.minor= link_to "New blog", new_admin_blog_url | 26 | %li.minor= link_to "New blog", new_admin_blog_url |
| 27 | %li.minor= link_to "Drafts", drafts_admin_blogs_url | ||
| 27 | %li{major_sidebar_attrs("streams")} | 28 | %li{major_sidebar_attrs("streams")} |
| 28 | = link_to "Streams", admin_streams_url, class: "major-link" | 29 | = link_to "Streams", admin_streams_url, class: "major-link" |
| 29 | %ul.minors | 30 | %ul.minors |
