post votes: add index page.
This commit is contained in:
@@ -22,11 +22,11 @@
|
||||
<% if CurrentUser.is_voter? %>
|
||||
<%= tag.span id: "vote-links-for-post-#{post.id}", style: ("display: none;" if !@post.can_be_voted_by?(CurrentUser.user)) do %>
|
||||
(vote
|
||||
<%= link_to tag.i(class: "far fa-thumbs-up"), post_votes_path(post_id: post.id, score: "up"), remote: true, method: :post %>
|
||||
<%= link_to tag.i(class: "far fa-thumbs-down"), post_votes_path(post_id: post.id, score: "down"), remote: true, method: :post %>)
|
||||
<%= link_to tag.i(class: "far fa-thumbs-up"), post_post_votes_path(post_id: post.id, score: "up"), remote: true, method: :post %>
|
||||
<%= link_to tag.i(class: "far fa-thumbs-down"), post_post_votes_path(post_id: post.id, score: "down"), remote: true, method: :post %>)
|
||||
<% end %>
|
||||
<%= tag.span id: "unvote-link-for-post-#{post.id}", style: ("display: none;" if @post.can_be_voted_by?(CurrentUser.user)) do %>
|
||||
(<%= link_to "undo vote", post_votes_path(post), remote: true, method: :delete, class: "unvote-post-link" %>)
|
||||
(<%= link_to "undo vote", post_post_votes_path(post), remote: true, method: :delete, class: "unvote-post-link" %>)
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user