From 435763f307284af1e58937dca63b02c650895ae5 Mon Sep 17 00:00:00 2001 From: Nic Haynes Date: Wed, 21 Mar 2012 00:23:58 -0500 Subject: Show published date if not drafted --- app/views/refinery/blog/admin/posts/_post.html.erb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/views/refinery') diff --git a/app/views/refinery/blog/admin/posts/_post.html.erb b/app/views/refinery/blog/admin/posts/_post.html.erb index f29db54..e9c9e6c 100644 --- a/app/views/refinery/blog/admin/posts/_post.html.erb +++ b/app/views/refinery/blog/admin/posts/_post.html.erb @@ -2,13 +2,14 @@ <%= post.title %> - <%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %> <%= " by #{post.author.username}" if post.author.present? %> + <% if post.draft? %> + Draft + <% else %> + <%= post.published_at.strftime('%b %d, %Y') %> + <% end %> - <% if post.draft? %> - Draft - <% end %> <%= link_to refinery_icon_tag("application_go.png"), refinery.blog_post_path(post), :title => t('.view_live_html'), -- cgit v1.2.3