Show published date if not drafted

This commit is contained in:
Nic Haynes 2012-03-21 00:23:58 -05:00
parent f8e38d516a
commit 435763f307

View file

@ -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'),