diff --git a/app/views/admin/poll/booth_assignments/show.html.erb b/app/views/admin/poll/booth_assignments/show.html.erb
index 65dfe2f12..64d73ebaf 100644
--- a/app/views/admin/poll/booth_assignments/show.html.erb
+++ b/app/views/admin/poll/booth_assignments/show.html.erb
@@ -58,7 +58,10 @@
| <%= t("admin.poll_booth_assignments.show.count_final") %> |
- <%= t("admin.poll_booth_assignments.show.total_system") %> |
+
+ <% unless @poll.recounts_confirmed? %>
+ <%= t("admin.poll_booth_assignments.show.total_system") %> |
+ <% end %>
@@ -66,30 +69,35 @@
<%= total_recounts_by_booth(@booth_assignment) || "-" %>
|
-
- <%= @booth_assignment.voters.count %>
- |
+
+ <% unless @poll.recounts_confirmed? %>
+
+ <%= @booth_assignment.voters.count %>
+ |
+ <% end %>
-
-
-
- | <%= t("admin.poll_booth_assignments.show.date") %> |
- <%= t("admin.poll_booth_assignments.show.count_by_system") %> |
-
-
-
- <% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %>
- <% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %>
- ">
- | <%= l voting_date %> |
- <%= system_count %> |
+ <% unless @poll.recounts_confirmed? %>
+
+
+
+ | <%= t("admin.poll_booth_assignments.show.date") %> |
+ <%= t("admin.poll_booth_assignments.show.count_by_system") %> |
- <% end %>
-
-
+
+
+ <% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %>
+ <% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %>
+ ">
+ | <%= l voting_date %> |
+ <%= system_count %> |
+
+ <% end %>
+
+
+ <% end %>
<%= render "results" %>
diff --git a/spec/features/admin/poll/booth_assigments_spec.rb b/spec/features/admin/poll/booth_assigments_spec.rb
index 39e292fcb..169956362 100644
--- a/spec/features/admin/poll/booth_assigments_spec.rb
+++ b/spec/features/admin/poll/booth_assigments_spec.rb
@@ -204,6 +204,26 @@ describe "Admin booths assignments" do
end
end
+ scenario "Doesn't show system recounts for old polls" do
+ poll = create(:poll, :old)
+ booth_assignment = create(:poll_booth_assignment, poll: poll)
+
+ create(:poll_voter, poll: poll, booth_assignment: booth_assignment)
+ create(:poll_recount, booth_assignment: booth_assignment, total_amount: 10)
+
+ visit admin_poll_booth_assignment_path(poll, booth_assignment)
+
+ within("#totals") do
+ within("#total_final") do
+ expect(page).to have_content "10"
+ end
+
+ expect(page).not_to have_selector "#total_system"
+ end
+
+ expect(page).not_to have_selector "#recounts_list"
+ end
+
scenario "Results for a booth assignment" do
poll = create(:poll)
booth_assignment = create(:poll_booth_assignment, poll: poll)