-
Notifications
You must be signed in to change notification settings - Fork 145
/
_comment.erb
30 lines (30 loc) · 1.21 KB
/
_comment.erb
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
28
29
30
<% if comment %>
<a name="comment-<%= comment.id %>"></a>
<div class="commentContainer">
<div class="comment" commentId="<%= comment.id %>"
data-comment-raw="<%= CGI::escape_html(comment.text)%>">
<div class="heading">
<div class="avatar"><img src="<%= comment.user.gravatar %>" /></div>
<% if comment.user.deleted_at %>
<span class="name north deleted" rel="tipsy" title="deleted user">
<% else %>
<span class="name">
<% end %>
<%= CGI::escape_html(comment.user.name) %>
</span>
<span class="permalink"><a href="#comment-<%= comment.id %>">commented</a></span>
<span class="date"><%= comment.created_at.to_pretty %> </span>
<div class="buttonContainer">
<% if current_user && comment.line_number %>
<button class="reply standard">Reply</button>
<% end %>
<% if current_user && current_user.id == comment.user_id %>
<button class="edit standard">Edit</button>
<button class="delete standard">Delete</button>
<% end %>
</div>
</div>
<div class="commentBody"> <%= comment.filter_text %> </div>
</div>
</div>
<% end %>