<h2 class="inline-block"><%= t("admin.polls.index.title") %></h2>

<% if @polls.any? %>
  <table>
    <thead>
      <th class="medium-6"><%= t("admin.polls.index.name") %></th>
      <th><%= t("admin.polls.index.dates") %></th>
      <th class="text-right"><%= t("admin.actions.actions") %></th>
    </thead>
    <tbody>
      <% @polls.each do |poll| %>
        <tr id="<%= dom_id(poll) %>" class="poll">
          <td>
            <strong><%= link_to poll.name, admin_poll_path(poll) %></strong>
          </td>
          <td>
            <%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
          </td>
          <td class="text-right">
            <%= link_to t("admin.booth_assignments.manage_assignments"),
                        manage_admin_poll_booth_assignments_path(poll),
                        class: "button hollow" %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="callout primary">
    <%= t("admin.polls.index.no_polls") %>
  </div>
<% end %>
