Files
nairobi/app/components/shared/in_favor_against_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

26 lines
1.0 KiB
Plaintext

<div class="in-favor-against">
<div class="in-favor">
<%= button_to polymorphic_path(votable, action: :vote, value: "yes"),
class: "like #{voted_classes[:in_favor]}",
title: t("votes.agree"),
"aria-label": agree_aria_label,
method: "post",
remote: true do %>
<span class="show-for-sr"><%= t("votes.agree") %></span>
<% end %>
<span class="percentage"><%= votes_percentage("likes", votable) %></span>
</div>
<div class="against">
<%= button_to polymorphic_path(votable, action: :vote, value: "no"),
class: "unlike #{voted_classes[:against]}",
title: t("votes.disagree"),
"aria-label": disagree_aria_label,
method: "post",
remote: true do %>
<span class="show-for-sr"><%= t("votes.disagree") %></span>
<% end %>
<span class="percentage"><%= votes_percentage("dislikes", votable) %></span>
</div>
</div>