diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index 56a50deec..7aabf7093 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -145,7 +145,7 @@ class Budget return :not_selected unless selected? return :no_ballots_allowed unless budget.balloting? return :different_heading_assigned unless ballot.valid_heading?(heading) - return :not_enough_money if ballot.present? && !enough_money?(ballot) + return :not_enough_money_html if ballot.present? && !enough_money?(ballot) end def permission_problem(user) diff --git a/app/views/budgets/investments/_ballot.html.erb b/app/views/budgets/investments/_ballot.html.erb index 0ad43ab43..605caebc7 100644 --- a/app/views/budgets/investments/_ballot.html.erb +++ b/app/views/budgets/investments/_ballot.html.erb @@ -50,8 +50,9 @@ signup: link_to(t("votes.signup"), new_user_registration_path), my_heading: link_to(investment.heading.name, budget_investments_path(budget_id: investment.budget_id, - heading_id: investment.heading_id)) - ).html_safe %> + heading_id: investment.heading_id)), + change_ballot: link_to(t("budgets.ballots.reasons_for_not_balloting.change_ballot"), + budget_ballot_path(@budget))).html_safe %>
diff --git a/config/locales/budgets.en.yml b/config/locales/budgets.en.yml index 19b52e976..6fba08534 100644 --- a/config/locales/budgets.en.yml +++ b/config/locales/budgets.en.yml @@ -17,9 +17,10 @@ en: not_verified: Only verified users can vote on investments; %{verify_account}. organization: Organizations are not permitted to vote not_selected: Unselected investment projects can not be supported - not_enough_money: "Price is higher than the available amount left." + not_enough_money_html: "You have already assigned the available budget.