aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/posts/_post.html.erb
blob: 7600d26c84645721bb11806ccd9243fd827f4c5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<% flash.each do |key, value| %>
 <div id='flash' class="flash flash_<%= key %>">
   <%= value %>
 </div>
<% end %>
<article id="blog_post">
  <header>
    <h1><%= @blog_post.title %></h1>
    <details>
      <time datetime="<%=l @blog_post.published_at.to_date, :format => :default %>" class='posted_at'>
        <%= t('blog.shared.posts.created_at', :when => l(@blog_post.published_at.to_date, :format => :short)) %>.
      </time> by <%= @blog_post.author.try :login %>
      <% if (categories = @blog_post.categories).any? %>
        <aside class='filed_in'>
          <%= t('blog.posts.show.filed_in') %>
          <% categories.each_with_index do |category, index| %>
              <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
          <% end %>
        </aside>
      <% end %>
    </details>
  </header>
  <%= @blog_post.body.html_safe %>

  <% if BlogPost::ShareThis.enabled? %>
    <span class="st_sharethis" displayText="ShareThis"></span>
  <% end %>
</article>
<%= render :partial => '/shared/draft_page_message' unless @blog_post.nil? or @blog_post.live? -%>
<% if next_or_previous?(@blog_post) -%>
  <%= render 'nav' %>
<% end -%>