disable voting on sps if setting disabled
refactors hover messages on sps votes
This commit is contained in:
@@ -18,25 +18,18 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if user_signed_in? && current_user.organization? %>
|
||||
<div class="organizations-votes" style='display:none'>
|
||||
<p>
|
||||
<%= t("votes.organizations") %>
|
||||
</p>
|
||||
</div>
|
||||
<% elsif user_signed_in? && !spending_proposal.votable_by?(current_user)%>
|
||||
<div class="anonymous-votes" style='display:none'>
|
||||
<p>
|
||||
<%= t("votes.verified_only",
|
||||
verify_account: link_to(t("votes.verify_account"), verification_path )).html_safe %>
|
||||
</p>
|
||||
</div>
|
||||
<% elsif !user_signed_in? %>
|
||||
<div class="not-logged" style='display:none'>
|
||||
<%= t("votes.unauthenticated",
|
||||
signin: link_to(t("votes.signin"), new_user_session_path),
|
||||
signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %>
|
||||
</div>
|
||||
<% reason = spending_proposal.reason_for_not_being_votable_by(current_user) %>
|
||||
|
||||
<% if reason.present? && !voted_for?(@spending_proposal_votes, spending_proposal) %>
|
||||
<div class="no-supports-allowed" style='display:none'>
|
||||
<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 voted_for?(@spending_proposal_votes, spending_proposal) && setting['twitter_handle'] %>
|
||||
|
||||
Reference in New Issue
Block a user