Created
March 29, 2012 13:27
-
-
Save Soldo/2237433 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if post.live? %> | |
<article class="blog_post image_present" id="<%= dom_id(post) %>"> | |
<% ima_slike = (post.custom_teaser.match /src="\S+/i) %> | |
<% if ima_slike %> | |
<section class="key_image"> | |
<% path_od_slike = ima_slike.to_s[5...-1] %> | |
<%= link_to image_tag(path_od_slike, :width=>"100", :height=>"100"), refinery.blog_post_path(post) %> | |
</section> | |
<% end %> | |
<blog_header> | |
<h2><%= link_to post.title, refinery.blog_post_path(post) %></h2> | |
<p class='meta'> | |
<!-- <time datetime="<%=l post.published_at.to_date, :format => :default %>" class='posted_at'>--> | |
<%= t('created_at', :scope => 'refinery.blog.shared.posts', :when => l(post.published_at.to_date, :format => :short)) %> | |
<!-- </time>--> | |
<%= "#{t('by', :scope => 'refinery.blog.posts.show')} #{post.author.username}" if post.author.present? %>. | |
<% if (categories = post.categories).any? %> | |
<!-- <aside class='filed_in'>--> | |
<%= t('filed_in', :scope => 'refinery.blog.posts.show') %> | |
<%=raw categories.collect { |category| link_to category.title, refinery.blog_category_path(category) }.to_sentence %> | |
<!-- </aside>--> | |
<% end %> | |
<% if (tags = post.tags).any? %> | |
<!-- <aside class='tagged'>--> | |
<%= t('tagged', :scope => 'refinery.blog.posts.show') %> | |
<%=raw tags.collect { |tag| link_to tag, refinery.blog_tagged_posts_path(tag.id, tag.name.parameterize) }.to_sentence %> | |
<!-- </aside>--> | |
<% end %> | |
<br /> | |
<!-- <aside class='comment_count'>--> | |
<% if Refinery::Blog::Post.comments_allowed? %> | |
<% if post.comments.any? %> | |
(<%= pluralize(post.comments.approved.count, t('singular', | |
:scope => 'refinery.blog.shared.comments')) %>) | |
<% else %> | |
(<%= t('none', :scope => 'refinery.blog.shared.comments') %>) | |
<% end %> | |
<% end %> | |
<!-- </aside>--> | |
</p> | |
</blog_header> | |
<section class='content'> | |
<%= post.body.html_safe %> | |
</section> | |
<footer> | |
<p> | |
<%= link_to t('read_more', :scope => 'refinery.blog.shared.posts'), refinery.blog_post_path(post) if blog_post_teaser_enabled? %> | |
</p> | |
</footer> | |
</article> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment