Simplify recounts code
Now the code is the same as the code in the poll booth assignment page.
This commit is contained in:
@@ -50,8 +50,6 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @booth_assignments.each do |booth_assignment| %>
|
<% @booth_assignments.each do |booth_assignment| %>
|
||||||
<% total_recounts = total_recounts_by_booth(booth_assignment) %>
|
|
||||||
<% system_count = booth_assignment.voters.size %>
|
|
||||||
<tr id="<%= dom_id(booth_assignment) %>_recounts" class="booth_recounts">
|
<tr id="<%= dom_id(booth_assignment) %>_recounts" class="booth_recounts">
|
||||||
<td>
|
<td>
|
||||||
<strong>
|
<strong>
|
||||||
@@ -60,21 +58,13 @@
|
|||||||
</td>
|
</td>
|
||||||
<% unless @poll.budget_poll? %>
|
<% unless @poll.budget_poll? %>
|
||||||
<td class="text-center" id="<%= dom_id(booth_assignment) %>_recount">
|
<td class="text-center" id="<%= dom_id(booth_assignment) %>_recount">
|
||||||
<% if total_recounts.present? %>
|
<%= total_recounts_by_booth(booth_assignment) || "-" %>
|
||||||
<strong><%= total_recounts %></strong>
|
|
||||||
<% else %>
|
|
||||||
<span>-</span>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @poll.recounts_confirmed? %>
|
<% unless @poll.recounts_confirmed? %>
|
||||||
<td class="text-center" id="<%= dom_id(booth_assignment) %>_system">
|
<td class="text-center" id="<%= dom_id(booth_assignment) %>_system">
|
||||||
<% if system_count.present? %>
|
<%= booth_assignment.voters.size || 0 %>
|
||||||
<strong><%= system_count %></strong>
|
|
||||||
<% else %>
|
|
||||||
<span>0</span>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user