diff --git a/loko/assets/static/assets/green_detail.js b/loko/assets/static/assets/green_detail.js
deleted file mode 100644
index 8fcc80c..0000000
--- a/loko/assets/static/assets/green_detail.js
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-const map = new maplibregl.Map({
- style: window.MAP_STYLE_LIGHT,
- center: [feature_lon, feature_lat],
- zoom: 17,
- pitch: 45,
- bearing: -17.6,
- container: 'map',
- antialias: true
-});
-
-map.on('load', () => {
-
- const featureData = {
- type: 'FeatureCollection',
- features: [
- {
- type: 'Feature',
- geometry: JSON.parse(feature_geojson),
- properties: {
- name: '...'
- }
- }
- ]
- };
-
- // Add the circle as a GeoJSON source
- map.addSource('green', {
- type: 'geojson',
- data: featureData
- });
-
- map.addLayer({
- 'id': 'green',
- 'type': 'fill',
- 'source': 'green',
- 'paint': {
- 'fill-color': '#0094ff',
- 'fill-opacity': 0.8
- }
- });
-});
-
diff --git a/loko/assets/templates/assets/naturegreensurface_detail.html b/loko/assets/templates/assets/naturegreensurface_detail.html
deleted file mode 100644
index d74680f..0000000
--- a/loko/assets/templates/assets/naturegreensurface_detail.html
+++ /dev/null
@@ -1,122 +0,0 @@
-{% extends "base.html" %}
-{% load static %}
-
-{% block content %}
-
-
-
- {{ asset.code}}
-
-
-
-
- {{ asset.get_status_display }}
- {{ asset.model.name_fr|default:"" }}
-
-
-
-
-
- {{ asset.density }}
- {{ asset.weighting }}
- {{ asset.weighting }}
-
-
-
-
- {{ asset.last_preventive_date|default:"" }}
-
-
-
-
-
-
-
-
-
- {% for document in asset.documents.all %}
-
- {% endfor %}
-
-
-
-
-
-
-
-
-
-
-
- |
- Code |
- Titre |
- Début |
- Statut |
-
-
- {% for interv in interventions %}
-
- |
-
-
-
- |
- {{ interv.code }} |
- {{ interv.title }} |
- {{ interv.begin_time|date:"d-m-Y H:i" }} |
- {{ interv.get_status_display }} |
-
- {% endfor %}
-
-
-
-
-
-
-
-
-
-
-{% endblock content%}
-
-
-{% block script %}
- {{ asset.lon|json_script:"lon_value" }}
- {{ asset.lat|json_script:"lat_value" }}
- {{ asset.geojson|json_script:"geojson_value" }}
-
-
-{% endblock script %}
\ No newline at end of file
diff --git a/loko/assets/tests.py b/loko/assets/tests.py
index 0fc930b..361d45b 100644
--- a/loko/assets/tests.py
+++ b/loko/assets/tests.py
@@ -5686,3 +5686,15 @@ class NatureLocationDetailViewTest(TestCase):
self.assertContains(response, "Aucun arbre enregistré")
self.assertContains(response, "layer-switcher-control.js")
+ def test_nature_greensurface_detail_view_uses_generic_template(self):
+ self.client.force_login(self.user)
+ url = reverse('assets:nature_assets_detail', kwargs={'asset_model': 'naturegreensurface', 'asset_id': self.gs1.id})
+ response = self.client.get(url)
+
+ self.assertEqual(response.status_code, 200)
+ self.assertTemplateUsed(response, 'assets/detail_generic.html')
+ self.assertTemplateNotUsed(response, 'assets/naturegreensurface_detail.html')
+ self.assertContains(response, "GS-001")
+ self.assertContains(response, 'id="asset-map"')
+
+