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-09 22:06:36 +02:00

19 lines
640 B
Plaintext

<div class="post">
<div class="post-title">
<h1><%= @post.title %></h1>
</div>
<div class="post-info"><%= link_to @post.author.name, @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">
<% @post.comments.each do |c| %>
<%= render "comments/comment", :c => c %>
<% end %>
<%= render "comments/new" %>
</div>
</div>