adds creation of null and white results by poll officers

This commit is contained in:
Juanjo Bazán
2017-02-03 19:11:04 +01:00
parent c9c4b30ffc
commit 2a902c68eb
8 changed files with 211 additions and 7 deletions

View File

@@ -8,8 +8,24 @@
</h3>
</div>
<div class="row">
<div class="small-12 medium-9 column">
<table>
<thead>
<tr>
<th><%= t("officing.results.index.table_whites") %></th>
<th><%= t("officing.results.index.table_nulls") %></th>
</tr>
</thead>
<tbody>
<tr>
<td id="white_results"><%= @whites %></td>
<td id="null_results"><%= @nulls %></td>
</tr>
</tbody>
</table>
<% by_question = @partial_results.group_by(&:question_id) %>
<% @poll.questions.each do |question| %>
<h3><%= question.title %></h3>
@@ -31,7 +47,6 @@
<% end %>
</tbody>
</table>
<% end %>
</div>
</div>

View File

@@ -39,13 +39,13 @@
<div class="row">
<div class="small-12 medium-6 large-3 column">
<h3><%= t("officing.results.new.ballots_blank") %></h3>
<%= text_field_tag :count, nil, placeholder: "0" %>
<h3><%= t("officing.results.new.ballots_white") %></h3>
<%= text_field_tag :whites, params[:whites].presence, placeholder: "0" %>
</div>
<div class="small-12 medium-6 large-3 column end">
<h3><%= t("officing.results.new.ballots_null") %></h3>
<%= text_field_tag :count, nil, placeholder: "0" %>
<%= text_field_tag :nulls, params[:nulls].presence, placeholder: "0" %>
</div>
</div>
<hr>