blob: 059f4a06b18d828ca6e5cee224d1135f5cd76e79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<li class="comment <%= @css_class || cycle("odd-bright", "") %>">
<input type="hidden" name="commentread-<%= comment.id %>" id="commentread-<%= comment.id %>" value="<%= comment.read ? "true" : "false" %>" />
<span class="comment-toolbox">
<%= link_to_function(comment.read ? image_tag("icons/flag-green.png", :title => 'done') : image_tag("icons/flag.png", :title => 'todo'),
"toggleCommentRead(#{comment.id})",
:title => 'Toggle read status',
:id => "commentflag-#{comment.id}") %>
</span>
<div class="comment-header">
<%= case comment.rating
when "approval"
image_tag('icons/approval.png', :title => 'Approval')
when "rejection"
image_tag('icons/rejection.png', :title => 'Rejection')
else
image_tag('icons/comment.png', :title => 'Neutral')
end -%>
</div>
<div class="comment-text"><%= Kramdown::Document.new(h(comment.text)).to_html.html_safe %></div>
<div class="comment-author">
<span class="comment-number">#<strong><%= @comment_number ||= 1 %></strong></span>
—<strong><%= comment.user.name %></strong>, <%= comment.created_at %>
</div>
</li>
<% @comment_number += 1 -%>
|