This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
redstoner.com/app/views/blogposts/show.html.erb
2013-10-20 18:19:27 +02:00

20 lines
693 B
Plaintext

<div class="post">
<div class="post-title">
<h1><%= @post.title %></h1>
</div>
<div class="post-info"><%= link_user @post.author %> on <%= @post.created_at.strftime("%e. %b %Y") %>
<% if mod? %>
<%= link_to "edit", edit_blogpost_path(@post.id), class: "post-edit" %>
<% end %>
</div>
<div class="post-content">
<%= Sanitize.clean(GitHub::Markdown.render_gfm(@post.content), Sanitize::Config::RELAXED).html_safe %>
</div>
<div id="comments">
<h3><%= "#{pluralize(@post.comments.length, 'comment')}." %></h3>
<% @post.comments.each do |c| %>
<%= render "comments/comment", :c => c %>
<% end %>
<%= render "comments/new" %>
</div>
</div>