Move geozones index view to a component
This way we simplify the header and it will be easier to add more code and tests.
This commit is contained in:
@@ -1,30 +1 @@
|
||||
<%= link_to t("admin.geozones.index.create"),
|
||||
new_admin_geozone_path, class: "button 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><%= t("admin.actions.actions") %></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>
|
||||
<%= render Admin::TableActionsComponent.new(geozone) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= render Admin::Geozones::IndexComponent.new(@geozones) %>
|
||||
|
||||
Reference in New Issue
Block a user