|
|
|
|
@@ -1,6 +1,16 @@
|
|
|
|
|
<% if CurrentUser.is_moderator? || (params[:search] && params[:search][:is_deleted] =~ /t/) || !comment.is_deleted? %>
|
|
|
|
|
<a name="comment-<%= comment.id %>"></a>
|
|
|
|
|
<article class="comment <%= "below-threshold" if comment.below_threshold? %>" data-post-id="<%= comment.post_id %>" data-comment-id="<%= comment.id %>" data-score="<%= comment.score %>" data-creator="<%= comment.creator.name %>" data-is-sticky="<%= comment.is_sticky %>">
|
|
|
|
|
<article class="comment"
|
|
|
|
|
data-id="<%= comment.id %>"
|
|
|
|
|
data-post-id="<%= comment.post_id %>"
|
|
|
|
|
data-creator-id="<%= comment.creator_id %>"
|
|
|
|
|
data-updater-id="<%= comment.updater_id %>"
|
|
|
|
|
data-score="<%= comment.score %>"
|
|
|
|
|
data-do-not-bump-post="<%= comment.do_not_bump_post? %>"
|
|
|
|
|
data-is-deleted="<%= comment.is_deleted? %>"
|
|
|
|
|
data-is-sticky="<%= comment.is_sticky? %>"
|
|
|
|
|
data-below-threshold="<%= comment.score < CurrentUser.user.comment_threshold %>"
|
|
|
|
|
data-is-voted="<%= comment.voted_by?(CurrentUser.user) %>">
|
|
|
|
|
<div class="author">
|
|
|
|
|
<h1>
|
|
|
|
|
<%= link_to_user comment.creator %>
|
|
|
|
|
@@ -31,9 +41,15 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<li><%= link_to "Edit", edit_comment_path(comment.id), :id => "edit_comment_link_#{comment.id}", :class => "edit_comment_link" %></li>
|
|
|
|
|
<% end %>
|
|
|
|
|
<li id="comment-vote-up-link-for-<%= comment.id %>"><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>
|
|
|
|
|
<li id="comment-vote-down-link-for-<%= comment.id %>"><%= link_to "Vote down", comment_votes_path(:comment_id => comment.id, :score => "down"), :method => :post, :remote => true %></li>
|
|
|
|
|
<li style="display: none;" id="comment-unvote-link-for-<%= comment.id %>" class="unvote-comment-link"><%= link_to "Unvote", comment_votes_path(:comment_id => comment.id), :method => :delete, :remote => true %></li>
|
|
|
|
|
<li class="comment-vote-up-link">
|
|
|
|
|
<%= link_to "Vote up", comment_votes_path(comment_id: comment.id, score: "up"), method: :post, remote: true %>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="comment-vote-down-link">
|
|
|
|
|
<%= link_to "Vote down", comment_votes_path(comment_id: comment.id, score: "down"), method: :post, remote: true %>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="comment-unvote-link">
|
|
|
|
|
<%= link_to "Unvote", comment_votes_path(comment_id: comment.id), method: :delete, remote: true %>
|
|
|
|
|
</li>
|
|
|
|
|
<% if CurrentUser.is_moderator? %>
|
|
|
|
|
<li>|</li>
|
|
|
|
|
<li>
|
|
|
|
|
|