Note the CSS could probably be improved to avoid duplication with other button style definitions. However, that's fine because we're going to change the style of the links soon. For the same reason, I haven't bothered to style every single link the way it was until now.
39 lines
1.3 KiB
Plaintext
39 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(actions: []) do |actions| %>
|
|
<%= actions.link_to t("admin.booth_assignments.manage.actions.assign"),
|
|
admin_poll_booth_assignments_path(@poll, booth_id: booth.id),
|
|
method: :post,
|
|
remote: true,
|
|
class: "assign-booth-link" %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|