This commit is contained in:
jomo
2013-07-29 14:15:52 +02:00
parent 2699751d86
commit 45ebd0bd05
4 changed files with 7 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
<div class="comment <%= "author" if c.user == @post.user %>">
<span class="comment-info"><%= link_to c.user.name, c.user %> <%= c.created_at.strftime("%e. %b %Y, %H:%m") %>
<% if current_user && ((current_user.rank >= rank_to_int("mod") && current_user.rank.to_i >= c.user.rank.to_i) || (current_user == c.user)) %>
<% if mod? || current_user == c.user %>
<div class="editlink"><%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c) %></div>
<% end %>
</span>
<div class="comment-content"><%= c.text %></div>
<div class="comment-content"><%= h(c.text).gsub("\n", "<br>").html_safe %></div>
</div>