64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
<% if @officer_assignments.any? %>
|
|
<h2><%= t("officing.recounts.new.title", poll: @poll.name) %></h2>
|
|
|
|
<%= form_tag(officing_poll_recounts_path(@poll), {id: "officer_assignment_form"}) do %>
|
|
<!-- Maybe this fields pre filled and disabled? -->
|
|
<div class="row">
|
|
<div class="small-12 medium-6 column">
|
|
<label><%= t("officing.recounts.new.booth_date") %></label>
|
|
<%= select_tag :officer_assignment_id,
|
|
officer_assignments_select_options(@officer_assignments),
|
|
{ prompt: t("officing.recounts.new.select_booth_date"),
|
|
label: false } %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="small-12 medium-6 large-4 column">
|
|
<label><%= t("officing.recounts.new.count") %></label>
|
|
<%= text_field_tag :count, nil, placeholder: t("officing.recounts.new.count_placeholder") %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="small-12 medium-6 large-4 column">
|
|
<%= submit_tag t("officing.recounts.new.submit"), class: "button expanded" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<h2><%= @poll.name %></h2>
|
|
<div class="callout alert">
|
|
<%= t("officing.recounts.new.not_allowed") %>
|
|
</div>
|
|
<% end %>
|
|
|
|
|
|
<% if @recounted.any? %>
|
|
<hr>
|
|
<h3><%= t("officing.recounts.new.recount_list") %></h3>
|
|
|
|
<table>
|
|
<thead>
|
|
<th><%= t("officing.recounts.new.date") %></th>
|
|
<th><%= t("officing.recounts.new.booth") %></th>
|
|
<th><%= t("officing.recounts.new.count") %></th>
|
|
</thead>
|
|
<tbody>
|
|
<% @recounted.each do |oa| %>
|
|
<tr id="<%= dom_id(oa.recount) %>">
|
|
<td>
|
|
<%= l(oa.date.to_date, format: :long) %>
|
|
</td>
|
|
<td>
|
|
<%= oa.booth_assignment.booth.name %>
|
|
</td>
|
|
<td>
|
|
<strong><%= oa.recount.count %></strong>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|