fixes #2838
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<% if @error %>
|
||||
Danbooru.error("<%= j @error.to_s %>");
|
||||
<% else %>
|
||||
<% if @comment_vote.is_negative? %>
|
||||
$(".comment[data-comment-id=<%= @comment.id %>]").remove();
|
||||
<% end %>
|
||||
<% end %>
|
||||
$("#comment-vote-up-link-for-<%= @comment.id %>").show();
|
||||
$("#comment-vote-down-link-for-<%= @comment.id %>").show();
|
||||
$("#comment-unvote-link-for-<%= @comment.id %>").hide();
|
||||
<% end %>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<% 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 id="comment-unvote-link-for-<%= comment.id %>" class="unvote-comment-link"><%= link_to "Unvote", unvote_comment_path(comment.id), :method => :put, :remote => true %></li>
|
||||
<li 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>
|
||||
<% end %>
|
||||
</menu>
|
||||
<% if comment.editable_by?(CurrentUser.user) %>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<% if @error %>
|
||||
Danbooru.error("<%= j @error.to_s %>");
|
||||
<% else %>
|
||||
$("#comment-vote-up-link-for-<%= @comment.id %>").show();
|
||||
$("#comment-vote-down-link-for-<%= @comment.id %>").show();
|
||||
$("#comment-unvote-link-for-<%= @comment.id %>").hide();
|
||||
<% end %>
|
||||
@@ -5,4 +5,4 @@
|
||||
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
|
||||
<% end %>
|
||||
$("#vote-links-for-post-<%= @post.id %>").show();
|
||||
$("#unvote-link-for-post-<%= @post.id %>").hide();
|
||||
$("#unvote-link-for-post-<%= @post.id %>").hide();
|
||||
@@ -16,7 +16,7 @@
|
||||
</li>
|
||||
<li>Source: <%= post_source_tag(post) %></li>
|
||||
<li>Rating: <%= post.pretty_rating %></li>
|
||||
<li>Score: <span id="score-for-post-<%= post.id %>"><%= post.score %></span> <% if CurrentUser.is_voter? %>(<span id="vote-links-for-post-<%= post.id %>">vote <%= link_to "up", post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %>/<%= link_to "down", post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %></span><%= link_to "undo vote", unvote_post_path(post), :remote => true, :method => :put, :id => "unvote-link-for-post-#{post.id}", :class => "unvote-post-link" %>)<% end %></li>
|
||||
<li>Score: <span id="score-for-post-<%= post.id %>"><%= post.score %></span> <% if CurrentUser.is_voter? %>(<span id="vote-links-for-post-<%= post.id %>">vote <%= link_to "up", post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %>/<%= link_to "down", post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %></span><%= link_to "undo vote", post_votes_path(post), :remote => true, :method => :delete, :id => "unvote-link-for-post-#{post.id}", :class => "unvote-post-link" %>)<% end %></li>
|
||||
<li>Favorites: <span id="favcount-for-post-<%= post.id %>"><%= post.fav_count %></span>
|
||||
<% if CurrentUser.is_gold? %>
|
||||
<%= link_to "Show »".html_safe, "#", :id => "show-favlist-link" %>
|
||||
|
||||
Reference in New Issue
Block a user