aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery/blog/posts/_post.html.erb
blob: f86f63a82b4b29d4553be3dcb0f3cfd328a9b313 (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
<% 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>
    <section class='details'>
      <time datetime="<%=l @blog_post.published_at.to_date, :format => :default %>" class='posted_at'>
        <%= t('created_at', :scope => 'refinery.blog.shared.posts', :when => l(@blog_post.published_at.to_date, :format => :short)) %>
      </time>
      <%= "#{t('by', :scope => 'refinery.blog.posts.show')} #{@blog_post.author.username}" if @blog_post.author.present? %>.
      <% if (categories = @blog_post.categories).any? %>
        <aside class='filed_in'>
          <%= t('filed_in', :scope => 'refinery.blog.posts.show') %>
          <% categories.each_with_index do |category, index| %>
            <%= link_to category.title, main_app.blog_category_path(category) -%><%= ',' if index < ((categories.length) - 1) %>
          <% end %>
        </aside>
      <% end %>
    </section>
  </header>
  <%= @blog_post.body.html_safe %>

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