Merge pull request #5390 Geozone Admin maps
This makes it easier to see if Geojson has been imported correctly.
This commit is contained in:
@@ -29,3 +29,10 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<section>
|
||||
<h3><%= t("admin.geozones.index.geojson_map") %></h3>
|
||||
<p class="help-text"><%= t("admin.geozones.index.geojson_map_help") %></p>
|
||||
|
||||
<%= render Shared::MapLocationComponent.new(nil, geozones_data: geozones_data) %>
|
||||
</section>
|
||||
|
||||
@@ -19,4 +19,14 @@ class Admin::Geozones::IndexComponent < ApplicationComponent
|
||||
t("shared.no")
|
||||
end
|
||||
end
|
||||
|
||||
def geozones_data
|
||||
geozones.map do |geozone|
|
||||
{
|
||||
outline_points: geozone.outline_points,
|
||||
color: geozone.color,
|
||||
headings: [link_to(geozone.name, edit_admin_geozone_path(geozone))]
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user