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-07-03 19:12:20 +02:00
|
|
|
<%= comment.highlighted ? "highlighted" : "" %>
|
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-30 21:14:35 +02:00
|
|
|
previewed
|
2012-06-17 03:15:46 +02:00
|
|
|
just now
|
2012-06-30 18:18:36 +02:00
|
|
|
<% else %>
|
|
|
|
<a href="/u/<%= comment.user.username %>"><%= comment.user.username
|
|
|
|
%></a>
|
2012-06-30 21:14:35 +02:00
|
|
|
|
2012-07-01 20:31:31 +02:00
|
|
|
<%= comment.has_been_edited?? "edited" : "" %>
|
|
|
|
<%= time_ago_in_words(comment.has_been_edited?? comment.updated_at :
|
|
|
|
comment.created_at).gsub(/^about /, "") %> ago
|
2012-06-30 18:18:36 +02:00
|
|
|
|
|
|
|
<span class="reason"><%= comment.current_vote &&
|
|
|
|
comment.current_vote[:vote] == -1 ?
|
2012-07-10 19:21:08 +02:00
|
|
|
"(#{Vote::COMMENT_REASONS[comment.current_vote[:reason]].downcase})" :
|
|
|
|
"" %></span>
|
2012-06-17 03:15:46 +02:00
|
|
|
<% end %>
|
|
|
|
|
2012-06-30 21:14:35 +02:00
|
|
|
<% if !comment.previewing %>
|
|
|
|
|
|
|
|
|
<a href="<%= story.comments_url %>/comments/<%= comment.short_id
|
|
|
|
%>">link</a>
|
2012-07-05 02:33:12 +02:00
|
|
|
|
|
|
|
<% if !story.is_gone? %>
|
|
|
|
|
|
|
|
|
<% if comment.is_editable_by_user?(@user) %>
|
|
|
|
<a class="comment_editor">edit</a>
|
|
|
|
<% else %>
|
|
|
|
<a class="comment_replier">reply</a>
|
|
|
|
<% end %>
|
2012-06-30 21:14:35 +02:00
|
|
|
<% end %>
|
2012-06-30 18:18:36 +02:00
|
|
|
|
2012-06-30 21:14:35 +02:00
|
|
|
<% if false && defined?(collapsable) && collapsable # XXX %>
|
|
|
|
|
|
|
|
|
<a href="">collapse</a>
|
2012-06-30 18:18:36 +02:00
|
|
|
<% end %>
|
2012-06-30 21:14:35 +02:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if defined?(show_story) && show_story %>
|
2012-07-12 00:20:43 +02:00
|
|
|
| on:
|
2012-06-30 21:14:35 +02:00
|
|
|
<a href="<%= story.comments_url %>"><%= story.title %></a>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="comment_text">
|
2012-07-05 17:08:14 +02:00
|
|
|
<%= raw comment.markeddown_comment %>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
2012-06-30 18:18:36 +02:00
|
|
|
|
|
|
|
<div class="comment_reply"></div>
|
2012-06-17 03:15:46 +02:00
|
|
|
</div>
|
|
|
|
</li>
|