Hides total final and total recount cells on budget poll recounts

This commit is contained in:
decabeza
2018-06-13 15:35:45 +02:00
committed by Javi Martín
parent fcbb11b26e
commit 429edd0745

View File

@@ -14,14 +14,18 @@
<thead> <thead>
<tr> <tr>
<th class="text-center"></th> <th class="text-center"></th>
<% unless @poll.budget_poll? %>
<th class="text-center"><%= t("admin.recounts.index.total_final") %></th> <th class="text-center"><%= t("admin.recounts.index.total_final") %></th>
<% end %>
<th class="text-center"><%= t("admin.recounts.index.total_system") %></th> <th class="text-center"><%= t("admin.recounts.index.total_system") %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td><strong><%= t("admin.recounts.index.all_booths_total") %></strong></td> <td><strong><%= t("admin.recounts.index.all_booths_total") %></strong></td>
<% unless @poll.budget_poll? %>
<td class="text-center" id="total_final"><%= @all_booths_counts[:final] %></td> <td class="text-center" id="total_final"><%= @all_booths_counts[:final] %></td>
<% end %>
<td class="text-center" id="total_system"><%= @all_booths_counts[:system] %></td> <td class="text-center" id="total_system"><%= @all_booths_counts[:system] %></td>
</tr> </tr>
</tbody> </tbody>
@@ -30,7 +34,9 @@
<table class="fixed margin"> <table class="fixed margin">
<thead> <thead>
<th><%= t("admin.recounts.index.table_booth_name") %></th> <th><%= t("admin.recounts.index.table_booth_name") %></th>
<% unless @poll.budget_poll? %>
<th class="text-center"><%= t("admin.recounts.index.table_total_recount") %></th> <th class="text-center"><%= t("admin.recounts.index.table_total_recount") %></th>
<% end %>
<th class="text-center"><%= t("admin.recounts.index.table_system_count") %></th> <th class="text-center"><%= t("admin.recounts.index.table_system_count") %></th>
</thead> </thead>
<tbody> <tbody>
@@ -43,6 +49,7 @@
<%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: "tab-recounts") %> <%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: "tab-recounts") %>
</strong> </strong>
</td> </td>
<% unless @poll.budget_poll? %>
<td class="text-center <%= "count-error" if total_recounts.to_i != system_count %>" id="<%= dom_id(booth_assignment) %>_recount"> <td class="text-center <%= "count-error" if total_recounts.to_i != system_count %>" id="<%= dom_id(booth_assignment) %>_recount">
<% if total_recounts.present? %> <% if total_recounts.present? %>
<strong><%= total_recounts %></strong> <strong><%= total_recounts %></strong>
@@ -50,6 +57,7 @@
<span>-</span> <span>-</span>
<% end %> <% end %>
</td> </td>
<% end %>
<td class="text-center" id="<%= dom_id(booth_assignment) %>_system"> <td class="text-center" id="<%= dom_id(booth_assignment) %>_system">
<% if system_count.present? %> <% if system_count.present? %>
<strong><%= system_count %></strong> <strong><%= system_count %></strong>