2012-06-30 18:18:36 +02:00
|
|
|
<li id="comment_<%= comment.short_id %>" data-shortid="<%= comment.short_id %>"
|
|
|
|
class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
|
|
|
|
"upvoted" : "downvoted") : "" %>
|
2012-06-17 03:15:46 +02:00
|
|
|
<%= comment.score <= 0 ? "negative" : "" %>
|
|
|
|
<%= comment.score <= -3 ? "negative_3" : "" %>
|
|
|
|
<%= comment.score <= -5 ? "negative_5" : "" %>
|
2012-06-30 18:18:36 +02:00
|
|
|
<%= comment.score <= -7 ? "negative_7" : "" %>">
|
2012-06-17 03:15:46 +02:00
|
|
|
<div class="voters">
|
2012-06-30 18:18:36 +02:00
|
|
|
<a class="upvoter"></a>
|
2012-06-17 03:15:46 +02:00
|
|
|
<div class="score">
|
|
|
|
<%= comment.score %>
|
|
|
|
</div>
|
2012-06-30 18:18:36 +02:00
|
|
|
<a class="downvoter"></a>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
<div class="details">
|
|
|
|
<div class="byline">
|
2012-06-30 18:18:36 +02:00
|
|
|
<% if comment.previewing %>
|
|
|
|
<a><%= comment.user.username %></a>
|
2012-06-17 03:15:46 +02:00
|
|
|
just now
|
2012-06-30 18:18:36 +02:00
|
|
|
<span class="reason">(Preview)</span>
|
|
|
|
<% else %>
|
|
|
|
<a href="/u/<%= comment.user.username %>"><%= comment.user.username
|
|
|
|
%></a>
|
|
|
|
<%= time_ago_in_words(comment.created_at).gsub(/^about /, "") %> ago
|
|
|
|
|
|
|
|
<span class="reason"><%= comment.current_vote &&
|
|
|
|
comment.current_vote[:vote] == -1 ?
|
|
|
|
"(#{Vote::COMMENT_REASONS[comment.current_vote[:reason]]})" : ""
|
|
|
|
%></span>
|
2012-06-17 03:15:46 +02:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="comment_text">
|
|
|
|
<%= raw comment.linkified_comment %>
|
|
|
|
|
|
|
|
<div class="comment_actions">
|
2012-06-30 18:18:36 +02:00
|
|
|
<% if comment.previewing %>
|
|
|
|
<a>link</a>
|
|
|
|
|
|
|
|
<a>reply</a>
|
|
|
|
<% else %>
|
|
|
|
<a href="<%= story.comments_url %>/comments/<%= comment.short_id
|
|
|
|
%>">link</a>
|
|
|
|
|
|
|
|
<a class="comment_replier">reply</a>
|
|
|
|
|
|
|
|
<% if defined?(collapsable) && collapsable %>
|
|
|
|
|
|
|
|
<a href="">collapse</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2012-06-30 18:18:36 +02:00
|
|
|
|
|
|
|
<div class="comment_reply"></div>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
</li>
|