We were using single quotes inside ERB code when that code was inside HTML double quotes.
46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
<div class="supports text-center">
|
|
|
|
<% reason = spending_proposal.reason_for_not_being_votable_by(current_user) %>
|
|
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
|
|
<% user_voted_for = voted_for?(@spending_proposal_votes, spending_proposal) %>
|
|
|
|
<span class="total-supports <%= "no-button" unless voting_allowed || user_voted_for %>">
|
|
<%= t("spending_proposals.spending_proposal.supports", count: spending_proposal.total_votes) %>
|
|
</span>
|
|
|
|
<div class="in-favor">
|
|
<% if user_voted_for %>
|
|
<div class="supported callout success">
|
|
<%= t("spending_proposals.spending_proposal.already_supported") %>
|
|
</div>
|
|
<% elsif voting_allowed %>
|
|
<%= link_to vote_url,
|
|
class: "button button-support small expanded",
|
|
title: t("spending_proposals.spending_proposal.support_title"), method: "post", remote: true,
|
|
"aria-hidden" => css_for_aria_hidden(reason) do %>
|
|
<%= t("spending_proposals.spending_proposal.support") %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if reason.present? && !user_voted_for %>
|
|
<div class="participation-not-allowed" style="display:none" aria-hidden="false">
|
|
<p>
|
|
<%= t("votes.spending_proposals.#{reason}",
|
|
verify_account: link_to(t("votes.verify_account"), verification_path),
|
|
signin: link_to(t("votes.signin"), new_user_session_path),
|
|
signup: link_to(t("votes.signup"), new_user_registration_path)
|
|
).html_safe %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if user_voted_for && setting["twitter_handle"] %>
|
|
<%= render partial: "shared/social_share", locals: {
|
|
title: spending_proposal.title,
|
|
url: spending_proposal_url(spending_proposal),
|
|
description: spending_proposal.title
|
|
} %>
|
|
<% end %>
|
|
</div>
|