Revert "fix vote buttons."

This reverts commit a0b6047d00.
This commit is contained in:
evazion
2021-04-02 03:58:14 -05:00
parent 243b3264e9
commit a2f3ba695c
6 changed files with 11 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
<span class="post-votes" data-id="<%= post.id %>">
<% if can_vote? %>
<% if upvoted? %>
<%= 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 %>
<%= 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 %>
<% 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(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 %>
<%= 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 %>
<% 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 %>