Skip to content

Commit fc97b68

Browse files
authored
Merge pull request consuldemocracy#1967 from AyuntamientoMadrid/check-ballot
Update texts on check my ballot links
2 parents a700184 + 8e4c6bf commit fc97b68

File tree

7 files changed

+37
-16
lines changed

7 files changed

+37
-16
lines changed

app/assets/stylesheets/participation.scss

+5
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,11 @@
11661166
text-decoration: none;
11671167
}
11681168

1169+
.confirmed {
1170+
font-size: rem-calc(24);
1171+
font-weight: bold;
1172+
}
1173+
11691174
.info {
11701175
background: #6a2a72;
11711176

app/views/budgets/ballot/_ballot.html.erb

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
<%= t("budgets.ballots.show.voted_html",
1010
count: @ballot.investments.count) %>
1111
</h2>
12+
<p class="confirmed">
13+
<%= t("budgets.ballots.show.voted_info_html") %>
1214
<p>
13-
<small>
14-
<%= t("budgets.ballots.show.voted_info_html") %>
15-
</small>
16-
</p>
15+
<p><%= t("budgets.ballots.show.voted_info_2") %></p>
1716
</div>
1817
</div>
1918
</div>

app/views/budgets/investments/_sidebar.html.erb

+4
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,8 @@
7272
<% end %>
7373
<% end %>
7474
</ul>
75+
76+
<%= link_to t("budgets.investments.header.check_ballot"),
77+
budget_ballot_path(@budget),
78+
class: "button hollow expanded" %>
7579
<% end %>

config/locales/en/budgets.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ en:
1010
voted_html:
1111
one: "You have voted <span>one</span> investment."
1212
other: "You have voted <span>%{count}</span> investments."
13-
voted_info_html: "You can change your vote at any time until the close of this phase.<br> No need to spend all the money available."
13+
voted_info_html: "Your ballot is confirmed!"
14+
voted_info_2: "But you can change your vote at any time until this phase is closed."
1415
zero: You have not voted any investment project.
1516
reasons_for_not_balloting:
1617
not_logged_in: You must %{signin} or %{signup} to continue.
@@ -91,7 +92,7 @@ en:
9192
voted_info_link: change your vote
9293
different_heading_assigned_html: "You have active votes in another heading: %{heading_link}"
9394
change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again."
94-
check_ballot_link: "check my ballot"
95+
check_ballot_link: "check and confirm my ballot"
9596
zero: You have not voted any investment project in this group.
9697
verified_only: "To create a new budget investment %{verify}."
9798
verify_account: "verify your account"
@@ -143,10 +144,10 @@ en:
143144
zero: No supports
144145
give_support: Support
145146
header:
146-
check_ballot: Check my ballot
147+
check_ballot: Check and confirm my ballot
147148
different_heading_assigned_html: "You have active votes in another heading: %{heading_link}"
148149
change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again."
149-
check_ballot_link: "check my ballot"
150+
check_ballot_link: "check and confirm my ballot"
150151
price: "This heading has a budget of"
151152
progress_bar:
152153
assigned: "You have assigned: "

config/locales/es/budgets.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ es:
1010
voted_html:
1111
one: "Has votado <span>un</span> proyecto."
1212
other: "Has votado <span>%{count}</span> proyectos."
13-
voted_info_html: "Puedes cambiar tus votos en cualquier momento hasta el cierre de esta fase.<br> No hace falta que gastes todo el dinero disponible."
13+
voted_info_html: "¡Tus votos están confirmados!"
14+
voted_info_2: "Pero puedes cambiarlos en cualquier momento hasta el cierre de esta fase."
1415
zero: Todavía no has votado ningún proyecto de gasto.
1516
reasons_for_not_balloting:
1617
not_logged_in: Necesitas %{signin} o %{signup} para continuar.
@@ -91,7 +92,7 @@ es:
9192
voted_info_link: cambiar tus votos
9293
different_heading_assigned_html: "Ya apoyaste proyectos de otra sección del presupuesto: %{heading_link}"
9394
change_ballot: "Si cambias de opinión puedes borrar tus votos en %{check_ballot} y volver a empezar."
94-
check_ballot_link: "revisar mis votos"
95+
check_ballot_link: "revisar y confirmar mis votos"
9596
zero: Todavía no has votado ningún proyecto de gasto en este ámbito del presupuesto.
9697
verified_only: "Para crear un nuevo proyecto de gasto %{verify}."
9798
verify_account: "verifica tu cuenta"
@@ -143,10 +144,10 @@ es:
143144
other: "%{count} apoyos"
144145
give_support: Apoyar
145146
header:
146-
check_ballot: Revisar mis votos
147+
check_ballot: Revisar y confirmar mis votos
147148
different_heading_assigned_html: "Ya apoyaste proyectos de otra sección del presupuesto: %{heading_link}"
148149
change_ballot: "Si cambias de opinión puedes borrar tus votos en %{check_ballot} y volver a empezar."
149-
check_ballot_link: "revisar mis votos"
150+
check_ballot_link: "revisar y confirmar mis votos"
150151
price: "Esta partida tiene un presupuesto de"
151152
progress_bar:
152153
assigned: "Has asignado: "

spec/features/budgets/ballots_spec.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
within("#sidebar") do
167167
expect(page).to have_content investment1.title
168168
expect(page).to have_content "€10,000"
169+
expect(page).to have_link("Check and confirm my ballot")
169170
end
170171

171172
add_to_ballot(investment2)
@@ -176,6 +177,7 @@
176177
within("#sidebar") do
177178
expect(page).to have_content investment2.title
178179
expect(page).to have_content "€20,000"
180+
expect(page).to have_link("Check and confirm my ballot")
179181
end
180182
end
181183

@@ -195,6 +197,7 @@
195197
within("#sidebar") do
196198
expect(page).to have_content investment.title
197199
expect(page).to have_content "€10,000"
200+
expect(page).to have_link("Check and confirm my ballot")
198201
end
199202

200203
within("#budget_investment_#{investment.id}") do
@@ -207,6 +210,7 @@
207210
within("#sidebar") do
208211
expect(page).not_to have_content investment.title
209212
expect(page).not_to have_content "€10,000"
213+
expect(page).to have_link("Check and confirm my ballot")
210214
end
211215
end
212216

@@ -505,7 +509,9 @@
505509
visit budget_investments_path(budget, heading_id: new_york.id)
506510
add_to_ballot(investment)
507511

508-
click_link "Check my ballot"
512+
within(".budget-heading") do
513+
click_link "Check and confirm my ballot"
514+
end
509515

510516
expect(page).to have_content("You have voted one investment")
511517

spec/features/budgets/investments_spec.rb

+8-3
Original file line numberDiff line numberDiff line change
@@ -996,10 +996,12 @@ def investments_order
996996

997997
visit budget_investments_path(budget, heading_id: heading.id)
998998

999-
expect(page).not_to have_link("Check my ballot")
999+
expect(page).not_to have_link("Check and confirm my ballot")
10001000
expect(page).not_to have_css("#progress_bar")
1001+
10011002
within("#sidebar") do
10021003
expect(page).not_to have_content("My ballot")
1004+
expect(page).not_to have_link("Check and confirm my ballot")
10031005
end
10041006
end
10051007

@@ -1634,7 +1636,8 @@ def investments_order
16341636

16351637
visit budget_ballot_path(budget)
16361638

1637-
expect(page).to have_content "You can change your vote at any time until the close of this phase"
1639+
expect(page).to have_content "But you can change your vote at any time "\
1640+
"until this phase is closed."
16381641

16391642
within("#budget_group_#{global_group.id}") do
16401643
expect(page).to have_content investment1.title
@@ -1697,10 +1700,12 @@ def investments_order
16971700

16981701
visit budget_investments_path(budget, heading_id: heading.id)
16991702

1700-
expect(page).to have_link("Check my ballot")
1703+
expect(page).to have_link("Check and confirm my ballot")
17011704
expect(page).to have_css("#progress_bar")
1705+
17021706
within("#sidebar") do
17031707
expect(page).to have_content("My ballot")
1708+
expect(page).to have_link("Check and confirm my ballot")
17041709
end
17051710
end
17061711

0 commit comments

Comments
 (0)