Complete booth assigment partial with assign/unassign buttons and status
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
<tr id="booth_<%= booth.id %>" class="booth">
|
||||
<td>
|
||||
<%= link_to booth.name, admin_booth_path(booth) %>
|
||||
</td>
|
||||
<% if booth_assignment.present? %>
|
||||
<td>
|
||||
<%= link_to booth.name, admin_booth_path(booth) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= t("admin.booth_assignments.status.assigned") %>
|
||||
<%= t("admin.booth_assignments.status.unassigned") %>
|
||||
<span class="verified"><%= t("admin.booth_assignments.status.assigned") %></span>
|
||||
</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" %>
|
||||
<%= link_to t("admin.booth_assignments.manage.actions.unassign"),
|
||||
admin_poll_booth_assignment_path(@poll, booth_assignment, booth_id: booth.id),
|
||||
method: :delete,
|
||||
remote: true,
|
||||
title: t("admin.booth_assignments.manage.actions.unassign"),
|
||||
class: "button hollow alert" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<td>
|
||||
<span class="delete"><%= t("admin.booth_assignments.status.unassigned") %></span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.booth_assignments.manage.actions.assign"),
|
||||
admin_poll_booth_assignments_path(@poll, booth_id: booth.id),
|
||||
method: :post,
|
||||
remote: true,
|
||||
title: t("admin.booth_assignments.manage.actions.assign"),
|
||||
class: "button" %>
|
||||
</td>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user