Renames supports to allow_participation
This commit is contained in:
12
app/assets/javascripts/allow_participation.js.coffee
Normal file
12
app/assets/javascripts/allow_participation.js.coffee
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
App.AllowParticipation =
|
||||||
|
|
||||||
|
initialize: ->
|
||||||
|
$(document).on {
|
||||||
|
'mouseenter focus': ->
|
||||||
|
$(this).find(".js-participation-not-allowed").show();
|
||||||
|
$(this).find(".js-participation-allowed").hide();
|
||||||
|
mouseleave: ->
|
||||||
|
$(this).find(".js-participation-not-allowed").hide();
|
||||||
|
$(this).find(".js-participation-allowed").show();
|
||||||
|
}, ".js-participation"
|
||||||
|
false
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
//= require tags
|
//= require tags
|
||||||
//= require users
|
//= require users
|
||||||
//= require votes
|
//= require votes
|
||||||
//= require supports
|
//= require allow_participation
|
||||||
//= require annotatable
|
//= require annotatable
|
||||||
//= require advanced_search
|
//= require advanced_search
|
||||||
//= require registration_form
|
//= require registration_form
|
||||||
@@ -54,7 +54,7 @@ var initialize_modules = function() {
|
|||||||
App.Comments.initialize();
|
App.Comments.initialize();
|
||||||
App.Users.initialize();
|
App.Users.initialize();
|
||||||
App.Votes.initialize();
|
App.Votes.initialize();
|
||||||
App.Supports.initialize();
|
App.AllowParticipation.initialize();
|
||||||
App.Tags.initialize();
|
App.Tags.initialize();
|
||||||
App.Dropdown.initialize();
|
App.Dropdown.initialize();
|
||||||
App.LocationChanger.initialize();
|
App.LocationChanger.initialize();
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
App.Supports =
|
|
||||||
|
|
||||||
initialize: ->
|
|
||||||
$(document).on {
|
|
||||||
'mouseenter focus': ->
|
|
||||||
$(this).find(".js-supports-not-allowed").show();
|
|
||||||
$(this).find(".js-supports-allowed").hide();
|
|
||||||
mouseleave: ->
|
|
||||||
$(this).find(".js-supports-not-allowed").hide();
|
|
||||||
$(this).find(".js-supports-allowed").show();
|
|
||||||
}, ".js-supports"
|
|
||||||
false
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<% reason = investment.reason_for_not_being_ballotable_by(current_user, ballot) %>
|
<% reason = investment.reason_for_not_being_ballotable_by(current_user, ballot) %>
|
||||||
<div class="supports ballot">
|
<div class="js-participation supports ballot">
|
||||||
<% if ballot.has_investment?(investment) %>
|
<% if ballot.has_investment?(investment) %>
|
||||||
|
|
||||||
<div class="remove supported inline-block">
|
<div class="remove supported inline-block">
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<% if reason.present? && !ballot.has_investment?(investment) %>
|
<% if reason.present? && !ballot.has_investment?(investment) %>
|
||||||
|
|
||||||
<div class="no-supports-allowed" style='display:none'>
|
<div class="js-participation-not-allowed" style='display:none'>
|
||||||
<p>
|
<p>
|
||||||
<%= t("votes.budget_investments.#{reason}",
|
<%= t("votes.budget_investments.#{reason}",
|
||||||
verify_account: link_to(t("votes.verify_account"), verification_path),
|
verify_account: link_to(t("votes.verify_account"), verification_path),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
|
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
|
||||||
<% user_voted_for = voted_for?(investment_votes, investment) %>
|
<% user_voted_for = voted_for?(investment_votes, investment) %>
|
||||||
|
|
||||||
<div class="supports js-supports">
|
<div class="supports js-participation">
|
||||||
|
|
||||||
<span class="total-supports <%= 'no-button' unless voting_allowed || user_voted_for %>">
|
<span class="total-supports <%= 'no-button' unless voting_allowed || user_voted_for %>">
|
||||||
<%= t("budget.investments.investment.supports", count: investment.total_votes) %>
|
<%= t("budget.investments.investment.supports", count: investment.total_votes) %>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if reason.present? && !user_voted_for %>
|
<% if reason.present? && !user_voted_for %>
|
||||||
<div class="js-supports-not-allowed" style='display:none' aria-hidden="false">
|
<div class="js-participation-not-allowed" style='display:none' aria-hidden="false">
|
||||||
<p>
|
<p>
|
||||||
<%= t("votes.budget_investments.#{reason}",
|
<%= t("votes.budget_investments.#{reason}",
|
||||||
verify_account: link_to(t("votes.verify_account"), verification_path),
|
verify_account: link_to(t("votes.verify_account"), verification_path),
|
||||||
|
|||||||
Reference in New Issue
Block a user