Add headings to "headings limit reached" alert msg
This commit is contained in:
@@ -35,8 +35,9 @@
|
||||
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)
|
||||
).html_safe %>
|
||||
signup: link_to(t("votes.signup"), new_user_registration_path),
|
||||
supported_headings: (current_user && current_user.headings_voted_within_group(investment.group).map(&:name).to_sentence)
|
||||
).html_safe %>
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -771,8 +771,8 @@ en:
|
||||
unfeasible: Unfeasible investment projects can not be supported
|
||||
not_voting_allowed: Voting phase is closed
|
||||
different_heading_assigned:
|
||||
one: "You can only support investment projects in %{count} district"
|
||||
other: "You can only support investment projects in %{count} districts"
|
||||
one: "You can only support investment projects in %{count} district. You have already supported investments in %{supported_headings}."
|
||||
other: "You can only support investment projects in %{count} districts. You have already supported investments in %{supported_headings}."
|
||||
welcome:
|
||||
feed:
|
||||
most_active:
|
||||
|
||||
@@ -770,8 +770,8 @@ es:
|
||||
unfeasible: No se pueden votar propuestas inviables.
|
||||
not_voting_allowed: El periodo de votación está cerrado.
|
||||
different_heading_assigned:
|
||||
one: "Sólo puedes apoyar proyectos de gasto de %{count} distrito"
|
||||
other: "Sólo puedes apoyar proyectos de gasto de %{count} distritos"
|
||||
one: "Sólo puedes apoyar proyectos de gasto de %{count} distrito. Ya has apoyado en %{supported_headings}."
|
||||
other: "Sólo puedes apoyar proyectos de gasto de %{count} distritos. Ya has apoyado en %{supported_headings}."
|
||||
welcome:
|
||||
feed:
|
||||
most_active:
|
||||
|
||||
@@ -142,7 +142,7 @@ feature 'Votes' do
|
||||
within("#budget_investment_#{third_heading_investment.id}") do
|
||||
find('.in-favor a').click
|
||||
|
||||
expect(page).to have_content "You can only support investment projects in 2 districts"
|
||||
expect(page).to have_content "You can only support investment projects in 2 districts. You have already supported investments in #{new_york.name} and #{san_francisco.name}"
|
||||
|
||||
expect(page).not_to have_content "1 support"
|
||||
expect(page).not_to have_content "You have already supported this investment project. Share it!"
|
||||
@@ -165,7 +165,7 @@ feature 'Votes' do
|
||||
visit budget_investment_path(budget, third_heading_investment)
|
||||
|
||||
find('.in-favor a').click
|
||||
expect(page).to have_content "You can only support investment projects in 2 districts"
|
||||
expect(page).to have_content "You can only support investment projects in 2 districts. You have already supported investments in #{new_york.name} and #{san_francisco.name}"
|
||||
|
||||
expect(page).not_to have_content "1 support"
|
||||
expect(page).not_to have_content "You have already supported this investment project. Share it!"
|
||||
|
||||
Reference in New Issue
Block a user