Show published date if not drafted
This commit is contained in:
parent
f8e38d516a
commit
435763f307
1 changed files with 5 additions and 4 deletions
|
@ -2,13 +2,14 @@
|
||||||
<span class='title'>
|
<span class='title'>
|
||||||
<%= post.title %>
|
<%= post.title %>
|
||||||
<span class="preview">
|
<span class="preview">
|
||||||
<%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %>
|
|
||||||
<%= " by #{post.author.username}" if post.author.present? %>
|
<%= " 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>
|
||||||
</span>
|
</span>
|
||||||
<% if post.draft? %>
|
|
||||||
<span class="label notice">Draft</span>
|
|
||||||
<% end %>
|
|
||||||
<span class='actions'>
|
<span class='actions'>
|
||||||
<%= link_to refinery_icon_tag("application_go.png"), refinery.blog_post_path(post),
|
<%= link_to refinery_icon_tag("application_go.png"), refinery.blog_post_path(post),
|
||||||
:title => t('.view_live_html'),
|
:title => t('.view_live_html'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue