Files
grecia/app/components/comments/votes_component.html.erb
Javi Martín 629e208e9d Add and apply ArgumentAlignment rubocop rule
We're choosing the default `with_first_argument` style because it's the
one we use the most.
2023-08-18 14:56:16 +02:00

25 lines
785 B
Plaintext

<div class="votes">
<%= t("comments.comment.votes", count: comment.total_votes) %>
&nbsp;|&nbsp;
<span class="in-favor">
<%= button_to vote_comment_path(comment, value: "yes"),
method: "post",
remote: can?(:vote, comment),
title: t("votes.agree") do %>
<span class="show-for-sr"><%= t("votes.agree") %></span>
<% end %>
<%= comment.total_likes %>
</span>
<span class="against">
<%= button_to vote_comment_path(comment, value: "no"),
method: "post",
remote: can?(:vote, comment),
title: t("votes.disagree") do %>
<span class="show-for-sr"><%= t("votes.disagree") %></span>
<% end %>
<%= comment.total_dislikes %>
</span>
</div>