Note we're using the in-favor HTML class instead of the in_favor class so we're consistent with our conventions for HTML classes and because we use the in-favor class in similar places. Also note the styles of the legislation process annotations/comments buttons is now similar to the styles in the other sections. Previously, the colors didn't have enough contrast and there was a very strange margin between the "thumbs up" icon and the number of people agreeing (that margin wasn't present between the "thumbs down" icon and the number of people disagreeing).
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
<div class="votes">
|
|
<%= t("comments.comment.votes", count: comment.total_votes) %>
|
|
|
|
|
|
|
<span class="in-favor">
|
|
<%= button_to vote_comment_path(comment, value: "yes"),
|
|
method: "post",
|
|
remote: true,
|
|
title: t("votes.agree"),
|
|
disabled: !can?(:vote, comment) 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: true,
|
|
title: t("votes.disagree"),
|
|
disabled: !can?(:vote, comment) do %>
|
|
<span class="show-for-sr"><%= t("votes.disagree") %></span>
|
|
<% end %>
|
|
<%= comment.total_dislikes %>
|
|
</span>
|
|
|
|
<% unless current_user %>
|
|
<div tabindex="0">
|
|
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
|
|
<%= sanitize(t("votes.comment_unauthenticated", signin: link_to_signin, signup: link_to_signup)) %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|