aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery/blog/posts/_post.html.erb
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 17:28:09 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 17:28:09 +0300
commit06071e558008477e1b8dbb376d6693af97eeff32 (patch)
tree0ed1e765b37975fbbd054b058a45712ee7464c73 /app/views/refinery/blog/posts/_post.html.erb
parent3fa8937b95a4d90000ad1be9c588424052136455 (diff)
downloadrefinerycms-blog-06071e558008477e1b8dbb376d6693af97eeff32.tar.gz
refinerycms-blog-06071e558008477e1b8dbb376d6693af97eeff32.tar.bz2
refinerycms-blog-06071e558008477e1b8dbb376d6693af97eeff32.zip
Wip.
Diffstat (limited to 'app/views/refinery/blog/posts/_post.html.erb')
-rw-r--r--app/views/refinery/blog/posts/_post.html.erb31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/views/refinery/blog/posts/_post.html.erb b/app/views/refinery/blog/posts/_post.html.erb
new file mode 100644
index 0000000..12978d3
--- /dev/null
+++ b/app/views/refinery/blog/posts/_post.html.erb
@@ -0,0 +1,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 => 'blog.shared.posts', :when => l(@blog_post.published_at.to_date, :format => :short)) %>
+ </time>
+ <%= "#{t('by', :scope => '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 => 'blog.posts.show') %>
+ <% categories.each_with_index do |category, index| %>
+ <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
+ <% end %>
+ </aside>
+ <% end %>
+ </section>
+ </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? -%>
+<%= render 'nav' if next_or_previous?(@blog_post) %>