42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
<li id="comment_<%= comment.short_id %>" class="<%= comment.vote == 1 ?
|
|
"upvoted" : (comment.vote == -1 ? "downvoted" : "") %>
|
|
<%= comment.score <= 0 ? "negative" : "" %>
|
|
<%= comment.score <= -3 ? "negative_3" : "" %>
|
|
<%= comment.score <= -5 ? "negative_5" : "" %>
|
|
<%= comment.score <= -7 ? "negative_7" : "" %>
|
|
">
|
|
<div class="voters">
|
|
<a class="upvoter" href="#" onclick="<%= comment.id ?
|
|
"Lobsters.upvoteComment('#{comment.short_id}'); " : "" %>return false;"
|
|
></a>
|
|
<div class="score">
|
|
<%= comment.score %>
|
|
</div>
|
|
<a class="downvoter" id="comment_downvoter_<%= comment.short_id %>"
|
|
href="#" onclick="<%= comment.id ?
|
|
"Lobsters.downvoteComment('#{comment.short_id}'); " : "" %>return false;"
|
|
></a>
|
|
</div>
|
|
<div class="details">
|
|
<div class="byline">
|
|
<a href="/u/<%= comment.user.username %>"><%= comment.user.username
|
|
%></a>
|
|
<% if comment.created_at %>
|
|
<%= time_ago_in_words(comment.created_at).gsub(/^about /, "") %> ago
|
|
<% else %>
|
|
just now
|
|
<% end %>
|
|
</div>
|
|
<div class="comment_text">
|
|
<%= raw comment.linkified_comment %>
|
|
|
|
<div class="comment_actions">
|
|
<a href="<%= story.comments_url %>/comments/<%= comment.short_id
|
|
%>">link</a>
|
|
|
|
<%= link_to("reply") %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|