aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/shared/_post.html.erb
blob: 56ac89cd4f80ca922f5bc14c40424cd5d1c0c4ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<li class='clearfix'>
  <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>
  <%= truncate(post.body, 
               :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250), 
               :preserve_html_tags => true) %>
  <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>