We're choosing the default `with_first_argument` style because it's the one we use the most.
26 lines
1.0 KiB
Plaintext
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>
|