aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/shared/_post.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/blog/shared/_post.html.erb')
-rw-r--r--app/views/blog/shared/_post.html.erb44
1 files changed, 23 insertions, 21 deletions
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 26f5fbf..46fc23b 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -1,22 +1,24 @@
-<li>
- <h2><%= link_to post.title, blog_post_url(post) %></h2>
- <p class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => post.created_at.strftime('%d %B %Y')) %>
- </p>
- <div clas='clearfix'>
- <%= truncate(post.body,
- :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
- :preserve_html_tags => true) %>
- </div>
- <p>
- <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
+<% if post.live? %>
+ <li>
+ <h2><%= link_to post.title, blog_post_url(post) %></h2>
+ <p class='posted_at'>
+ <%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>
+ </p>
+ <div clas='clearfix'>
+ <%= truncate(post.body,
+ :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
+ :preserve_html_tags => true) %>
+ </div>
+ <p>
+ <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
- <span class='comment_count'>
- <% if post.comments.any? %>
- (<%= pluralize(post.comments.count, t('blog.shared.comments.singular')) %>)
- <% else %>
- (<%= t('blog.shared.comments.none') %>)
- <% end %>
- </span>
- </p>
-</li> \ No newline at end of file
+ <span class='comment_count'>
+ <% if post.comments.any? %>
+ (<%= pluralize(post.comments.count, t('blog.shared.comments.singular')) %>)
+ <% else %>
+ (<%= t('blog.shared.comments.none') %>)
+ <% end %>
+ </span>
+ </p>
+ </li>
+<% end %> \ No newline at end of file