Files
grecia/app/views/admin/poll/shifts/new.html.erb
Javi Martín ee34ead4ee Move poll shifts form partial to a component
Thanks to it, we can move a few helper methods to the component.
2024-11-12 15:17:16 +01:00

23 lines
525 B
Plaintext

<%= back_link_to available_admin_booths_path %>
<h2><%= @booth.name %></h2>
<% if @officer.blank? %>
<p>
<%= t("admin.poll_shifts.new.search_officer_text") %>
</p>
<%= render "search_officers" %>
<% else %>
<%= render Admin::Poll::Shifts::FormComponent.new(@shift, booth: @booth, officer: @officer) %>
<% end %>
<div id="shifts">
<% if @shifts.empty? %>
<div class="callout primary">
<%= t("admin.poll_shifts.new.no_shifts") %>
</div>
<% else %>
<%= render "shifts" %>
<% end %>
</div>