<%= link_to t("admin.geozones.index.create"),
              new_admin_geozone_path, class: "button success float-right" %>

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

<table>
  <thead>
    <tr>
      <th><%= t("admin.geozones.geozone.name") %></th>
      <th><%= t("admin.geozones.geozone.external_code") %></th>
      <th><%= t("admin.geozones.geozone.census_code") %></th>
      <th><%= t("admin.geozones.geozone.coordinates") %></th>
      <th colspan="2"></th>
    </tr>
  </thead>

  <tbody>
    <% @geozones.each do |geozone| %>
      <tr id="<%= dom_id(geozone) %>">
        <td><%= geozone.name %></td>
        <td><%= geozone.external_code %></td>
        <td><%= geozone.census_code %></td>
        <td class="break"><%= geozone.html_map_coordinates %></td>
        <td>
          <%= link_to t("admin.geozones.index.edit"), edit_admin_geozone_path(geozone), class: 'edit-banner button hollow' %>
        </td>
        <td>
          <%= link_to t("admin.geozones.index.delete"), admin_geozone_path(geozone), method: :delete, class: 'button hollow alert' %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
