We're choosing the default `with_first_argument` style because it's the one we use the most.
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
<td>
|
|
<%= link_to booth.name, admin_booth_path(booth) %>
|
|
</td>
|
|
<td>
|
|
<%= booth.location || t("admin.booths.index.no_location") %>
|
|
</td>
|
|
<% if booth_assignment.present? %>
|
|
<td>
|
|
<span class="enabled">
|
|
<strong><%= t("admin.booth_assignments.manage.status.assigned") %></strong>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<% unless @poll.expired? %>
|
|
<%= render Admin::TableActionsComponent.new(
|
|
booth_assignment,
|
|
actions: [:destroy],
|
|
destroy_text: t("admin.booth_assignments.manage.actions.unassign"),
|
|
destroy_confirmation: (booth_assignment.shifts? ? t("admin.poll_booth_assignments.alert.shifts") : ""),
|
|
destroy_options: { remote: true }
|
|
) %>
|
|
<% end %>
|
|
</td>
|
|
<% else %>
|
|
<td>
|
|
<span class="disabled"><%= t("admin.booth_assignments.manage.status.unassigned") %></span>
|
|
</td>
|
|
<td>
|
|
<% unless @poll.expired? %>
|
|
<%= render Admin::TableActionsComponent.new(booth, actions: []) do |actions| %>
|
|
<%= actions.action(:assign_booth,
|
|
text: t("admin.booth_assignments.manage.actions.assign"),
|
|
path: admin_poll_booth_assignments_path(@poll, booth_id: booth.id),
|
|
method: :post,
|
|
remote: true) %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|