% reason = investment.reason_for_not_being_selectable_by(current_user) %>
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
<% user_voted_for = voted_for?(investment_votes, investment) %>
">
<%= t("budgets.investments.investment.supports", count: investment.total_votes) %>
<% if user_voted_for %>
<%= t("budgets.investments.investment.already_supported") %>
<% elsif investment.should_show_votes? %>
<%= link_to vote_url,
class: "button button-support small expanded",
title: t("budgets.investments.investment.support_title"),
method: "post",
remote: (display_support_alert?(investment) ? false: true ),
data: (display_support_alert?(investment) ? {
confirm: t("budgets.investments.investment.confirm_group")} : nil),
"aria-hidden" => css_for_aria_hidden(reason) do %>
<%= t("budgets.investments.investment.give_support") %>
<% end %>
<% end %>
<% if reason.present? && !user_voted_for %>
<%= t("votes.budget_investments.#{reason}",
count: investment.group.max_votable_headings,
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),
supported_headings: (current_user && current_user.headings_voted_within_group(investment.group).map(&:name).sort.to_sentence)
).html_safe %>
<% end %>
<% if user_voted_for && setting["twitter_handle"] %>
<%= render partial: "shared/social_share", locals: {
title: investment.title,
image_url: image_absolute_url(investment.image, :thumb),
url: budget_investment_url(investment.budget, investment),
description: investment.title,
mobile: investment.title
} %>
<% end %>