Files
grecia/app/views/admin/poll/booths/index.html.erb
Javi Martín 24e4f4518f Render search field before "no results" message
The same way it's done in other sections.
2019-10-07 14:30:39 +02:00

32 lines
875 B
Plaintext

<h2 class="inline-block"><%= t("admin.booths.index.title") %></h2>
<% if controller_name == "booths" && action_name != "available" %>
<%= link_to t("admin.booths.index.add_booth"), new_admin_booth_path, class: "button float-right" %>
<% end %>
<%= render "/admin/shared/booth_search", url: admin_booths_path %>
<% if @booths.empty? %>
<div class="callout primary">
<%= t("admin.booths.index.no_booths") %>
</div>
<% end %>
<% if @booths.any? %>
<h3><%= page_entries_info @booths %></h3>
<table>
<thead>
<th><%= t("admin.booths.index.name") %></th>
<th><%= t("admin.booths.index.location") %></th>
<th class="text-right"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @booths.each do |booth| %>
<%= render "booth", booth: booth %>
<% end %>
</tbody>
</table>
<%= paginate @booths %>
<% end %>