45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
<% if @booths.blank? %>
|
|
<div class="callout alert margin-bottom">
|
|
<%= t('admin.polls.show.no_search_results') %>
|
|
</div>
|
|
<% else %>
|
|
<h3><%= t('admin.polls.show.search_results') %></h3>
|
|
<% end %>
|
|
|
|
<% if @booths.any? %>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.polls.show.table_name") %></th>
|
|
<th><%= t("admin.polls.show.table_location") %></th>
|
|
<th class="text-center"><%= t("admin.polls.show.table_assignment") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @booths.each do |booth| %>
|
|
<tr>
|
|
<td>
|
|
<%= booth.name %>
|
|
</td>
|
|
<td>
|
|
<%= booth.location %>
|
|
</td>
|
|
<td class="text-center">
|
|
<% if @poll.booth_ids.include?(booth.id) %>
|
|
<%= link_to t("admin.polls.show.remove_booth"),
|
|
admin_booth_assignment_path(poll: @poll, booth: booth),
|
|
method: :delete,
|
|
class: "button hollow alert" %>
|
|
<% else %>
|
|
<%= link_to t("admin.polls.show.add_booth"),
|
|
admin_booth_assignments_path(poll: @poll, booth: booth),
|
|
method: :post,
|
|
class: "button hollow" %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|