From f036f2a46f5c085505aff507f54518df8e283069 Mon Sep 17 00:00:00 2001 From: djones Date: Tue, 21 Sep 2010 17:20:08 +1200 Subject: added publish date support. fixes bug where categories were showing posts that were technically supposed to be hidden from the end user --- app/views/blog/shared/_post.html.erb | 44 +++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'app/views/blog/shared/_post.html.erb') 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 @@ -
  • -

    <%= link_to post.title, blog_post_url(post) %>

    -

    - <%= t('blog.shared.posts.created_at', :when => post.created_at.strftime('%d %B %Y')) %> -

    -
    - <%= truncate(post.body, - :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250), - :preserve_html_tags => true) %> -
    -

    - <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %> +<% if post.live? %> +

  • +

    <%= link_to post.title, blog_post_url(post) %>

    +

    + <%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %> +

    +
    + <%= truncate(post.body, + :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250), + :preserve_html_tags => true) %> +
    +

    + <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %> - - <% if post.comments.any? %> - (<%= pluralize(post.comments.count, t('blog.shared.comments.singular')) %>) - <% else %> - (<%= t('blog.shared.comments.none') %>) - <% end %> - -

    -
  • \ No newline at end of file + + <% if post.comments.any? %> + (<%= pluralize(post.comments.count, t('blog.shared.comments.singular')) %>) + <% else %> + (<%= t('blog.shared.comments.none') %>) + <% end %> + +

    + +<% end %> \ No newline at end of file -- cgit v1.2.3