diff options
author | Joe Sak <joe@joesak.com> | 2012-03-26 14:46:49 -0700 |
---|---|---|
committer | Joe Sak <joe@joesak.com> | 2012-03-26 14:46:49 -0700 |
commit | 2a00257420c2e9da28d8996136ae1b222c8a2b40 (patch) | |
tree | 0fa4ded6b1892748e866f59231df48d6fdb6a765 /app/views/refinery/blog | |
parent | cb88d9508e9f2ca8fa9a1d0dd507228d4e15605e (diff) | |
parent | 0c78cd138d06997116bc4d6c54f721a6d28d39b7 (diff) | |
download | refinerycms-blog-2a00257420c2e9da28d8996136ae1b222c8a2b40.tar.gz refinerycms-blog-2a00257420c2e9da28d8996136ae1b222c8a2b40.tar.bz2 refinerycms-blog-2a00257420c2e9da28d8996136ae1b222c8a2b40.zip |
Merge pull request #211 from nicinabox/master
Add draft label
Diffstat (limited to 'app/views/refinery/blog')
-rw-r--r-- | app/views/refinery/blog/admin/posts/_form.html.erb | 11 | ||||
-rw-r--r-- | app/views/refinery/blog/admin/posts/_post.html.erb | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb index 9bfd42a..a977754 100644 --- a/app/views/refinery/blog/admin/posts/_form.html.erb +++ b/app/views/refinery/blog/admin/posts/_form.html.erb @@ -9,6 +9,13 @@ <%= f.label :title -%> <%= f.text_field :title, :class => 'larger widest' -%> </div> + + <div class="field"> + <p> + <%= f.check_box :draft %> + <%= f.label :draft, t('.save_as_draft'), :class => "stripped" %> + </p> + </div> <div class='field'> <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'> @@ -50,10 +57,6 @@ :id => 'toggle_advanced_options', :title => t('.toggle_advanced_options') %> </p> - <span id='draft_field'> - <%= f.check_box :draft %> - <%= f.label :draft, t('.save_as_draft'), :class => "stripped" %> - </span> </div> <div id='more_options' style="display:none;"> <div class="hemisquare"> diff --git a/app/views/refinery/blog/admin/posts/_post.html.erb b/app/views/refinery/blog/admin/posts/_post.html.erb index b5018f3..fea3eb8 100644 --- a/app/views/refinery/blog/admin/posts/_post.html.erb +++ b/app/views/refinery/blog/admin/posts/_post.html.erb @@ -2,8 +2,12 @@ <span class='title'> <%= post.title %> <span class="preview"> - <%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %> <%= " by #{post.author.username}" if post.author.present? %> + <% if post.draft? %> + <span class="label notice"><%= t('refinery.blog.admin.posts.post.draft') %></span> + <% else %> + <%= post.published_at.strftime('%b %d, %Y') %> + <% end %> </span> </span> <span class='actions'> |