Complete booth assignment view list without actions yet
This commit is contained in:
@@ -47,6 +47,7 @@ class Admin::Poll::BoothAssignmentsController < Admin::Poll::BaseController
|
||||
|
||||
def manage
|
||||
@booths = ::Poll::Booth.all
|
||||
@poll = Poll.find(params[:poll_id])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<tr id="booth_<%= booth.id %>" class="booth">
|
||||
<td>
|
||||
<%= link_to booth.name, admin_booth_path(booth) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= t("admin.booth_assignments.status.assigned") %>
|
||||
<%= t("admin.booth_assignments.status.unassigned") %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.booth_assignments.manage.assign"),
|
||||
new_admin_booth_shift_path(booth),
|
||||
class: "button" %>
|
||||
<%= link_to t("admin.booth_assignments.manage.unassign"),
|
||||
new_admin_booth_shift_path(booth),
|
||||
class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1,25 +1,25 @@
|
||||
<h2 class="inline-block"><%= t("admin.booths.index.title") %></h2>
|
||||
|
||||
<% if controller_name == "booths" && action_name != "available" %>
|
||||
<%= link_to t("admin.booths.index.add_booth"), new_admin_booth_path, class: "button success float-right" %>
|
||||
<%= link_to booth_assignments_admin_polls_path do %>
|
||||
<span class="icon-angle-left"></span> <%= t("shared.back") %>
|
||||
<% end %>
|
||||
<hr>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.booth_assignments.manage.assignments_list", poll: @poll.name) %></h2>
|
||||
|
||||
<% if @booths.empty? %>
|
||||
<div class="callout primary">
|
||||
<%= t("admin.booths.index.no_booths") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @booths.any? %>
|
||||
<% else %>
|
||||
<table>
|
||||
<thead>
|
||||
<th><%= t("admin.booths.index.name") %></th>
|
||||
<th><%= t("admin.booth_assignments.status.assign_status") %></th>
|
||||
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<%= render partial: "booth_assignment", locals: { booth: booth } %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -527,6 +527,15 @@ en:
|
||||
recount_scrutiny: Recount & Scrutiny
|
||||
booth_assignments:
|
||||
manage_assignments: Manage assignments
|
||||
manage:
|
||||
assignments_list: "Assignments for poll '%{poll}'"
|
||||
status:
|
||||
assign_status: Assignment
|
||||
assigned: Assigned
|
||||
unassigned: Unassigned
|
||||
actions:
|
||||
assign: Assign booth
|
||||
unassign: Unassign booth
|
||||
poll_booth_assignments:
|
||||
flash:
|
||||
destroy: "Booth not assigned anymore"
|
||||
|
||||
@@ -527,6 +527,15 @@ es:
|
||||
recount_scrutiny: Recuento & Escrutinio
|
||||
booth_assignments:
|
||||
manage_assignments: Gestionar asignaciones
|
||||
manage:
|
||||
assignments_list: "Asignaciones para la votación '%{poll}'"
|
||||
status:
|
||||
assign_status: Asignación
|
||||
assigned: Asignada
|
||||
unassigned: No asignada
|
||||
actions:
|
||||
assign: Assign booth
|
||||
unassign: Unassign booth
|
||||
poll_booth_assignments:
|
||||
flash:
|
||||
destroy: "Urna desasignada"
|
||||
|
||||
Reference in New Issue
Block a user