fix vote buttons.
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
<% if current_user.is_anonymous? %>
|
||||
<%= link_to upvote_icon, login_path(url: request.fullpath), class: "comment-upvote-link inactive-link" %>
|
||||
<% elsif upvoted? %>
|
||||
<%= link_to upvote_icon, comment_vote_path(current_vote), class: "comment-upvote-link comment-unvote-link active-link", method: :delete, remote: true %>
|
||||
<%= link_to upvote_icon(active: true), comment_vote_path(current_vote), class: "comment-upvote-link comment-unvote-link active-link", method: :delete, remote: true %>
|
||||
<% else %>
|
||||
<%= link_to upvote_icon, comment_comment_votes_path(comment_id: comment.id, score: "1"), class: "comment-upvote-link inactive-link", method: :post, remote: true %>
|
||||
<% end %>
|
||||
@@ -64,7 +64,7 @@
|
||||
<% if current_user.is_anonymous? %>
|
||||
<%= link_to downvote_icon, login_path(url: request.fullpath), class: "comment-downvote-link inactive-link" %>
|
||||
<% elsif downvoted? %>
|
||||
<%= link_to downvote_icon, comment_vote_path(current_vote), class: "comment-downvote-link comment-unvote-link active-link", method: :delete, remote: true %>
|
||||
<%= link_to downvote_icon(active: true), comment_vote_path(current_vote), class: "comment-downvote-link comment-unvote-link active-link", method: :delete, remote: true %>
|
||||
<% else %>
|
||||
<%= link_to downvote_icon, comment_comment_votes_path(comment_id: comment.id, score: "-1"), class: "comment-downvote-link inactive-link", method: :post, remote: true %>
|
||||
<% end %>
|
||||
|
||||
@@ -48,3 +48,7 @@ article.comment {
|
||||
height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.comment-section img {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<span class="post-votes" data-id="<%= post.id %>">
|
||||
<% if can_vote? %>
|
||||
<% if upvoted? %>
|
||||
<%= link_to upvote_icon, post_post_votes_path(post_id: post.id), class: "post-upvote-link post-unvote-link active-link", method: :delete, remote: true %>
|
||||
<%= link_to upvote_icon(active: true, post: post), post_post_votes_path(post_id: post.id), class: "post-upvote-link post-unvote-link active-link", method: :delete, remote: true %>
|
||||
<% else %>
|
||||
<%= link_to upvote_icon, post_post_votes_path(post_id: post.id, score: 1), class: "post-upvote-link inactive-link", method: :post, remote: true %>
|
||||
<% end %>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<% if can_vote? %>
|
||||
<% if downvoted? %>
|
||||
<%= link_to downvote_icon, post_post_votes_path(post_id: post.id), class: "post-downvote-link post-unvote-link active-link", method: :delete, remote: true %>
|
||||
<%= link_to downvote_icon(active: true, post: post), post_post_votes_path(post_id: post.id), class: "post-downvote-link post-unvote-link active-link", method: :delete, remote: true %>
|
||||
<% else %>
|
||||
<%= link_to downvote_icon, post_post_votes_path(post_id: post.id, score: -1), class: "post-downvote-link inactive-link", method: :post, remote: true %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user