aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery
diff options
context:
space:
mode:
authorNic Haynes <nic@nicinabox.com>2012-03-21 00:23:58 -0500
committerNic Haynes <nic@nicinabox.com>2012-03-21 00:23:58 -0500
commit435763f307284af1e58937dca63b02c650895ae5 (patch)
treee2d452269577ccfb0fc528c5243b36ab06c2d27a /app/views/refinery
parentf8e38d516a608f03f2c4494c743be18e10e6cc6f (diff)
downloadrefinerycms-blog-435763f307284af1e58937dca63b02c650895ae5.tar.gz
refinerycms-blog-435763f307284af1e58937dca63b02c650895ae5.tar.bz2
refinerycms-blog-435763f307284af1e58937dca63b02c650895ae5.zip
Show published date if not drafted
Diffstat (limited to 'app/views/refinery')
-rw-r--r--app/views/refinery/blog/admin/posts/_post.html.erb9
1 files changed, 5 insertions, 4 deletions
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 @@
<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">Draft</span>
+ <% else %>
+ <%= post.published_at.strftime('%b %d, %Y') %>
+ <% end %>
</span>
</span>
- <% if post.draft? %>
- <span class="label notice">Draft</span>
- <% end %>
<span class='actions'>
<%= link_to refinery_icon_tag("application_go.png"), refinery.blog_post_path(post),
:title => t('.view_live_html'),