app/views/admin/poll/shifts/_search_officers_results.html.erb
<% if @officers.blank? %>
<div class="callout alert margin-bottom">
<%= t("admin.shared.no_search_results") %>
</div>
<% else %>
<h3><%= t("admin.shared.search_results") %></h3>
<table>
<thead>
<tr>
<th><%= t("admin.poll_shifts.new.table_name") %></th>
<th><%= t("admin.poll_shifts.new.table_email") %></th>
<th><%= t("admin.poll_shifts.new.table_shift") %></th>
</tr>
</thead>
<tbody>
<% @officers.each do |user| %>
<tr>
<td>
<%= user.name %>
</td>
<td>
<%= user.email %>
</td>
<td>
<%= render Admin::TableActionsComponent.new(
user,
actions: [:edit],
edit_text: t("admin.poll_shifts.new.edit_shifts"),
edit_path: new_admin_booth_shift_path(officer_id: user.poll_officer.id)
) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>