aboutsummaryrefslogblamecommitdiffstats
path: root/app/views/blog/shared/_post.html.erb
blob: 46fc23b6f83c49780645b87cef6bf68de91e4f95 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                               
    









                                                                                      
<% 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>
<% end %>