diff --git a/CHANGELOG.md b/CHANGELOG.md
index 571b1a60..f150cce2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -77,6 +77,7 @@
- `collectionInfo.ftl` shows the collection id alongside its title and
description, and links to the collection's schema. `collections.ftl` lists
entries as `collection_id (Title)`.
+- The HTML collection page links to the collection schema and shows the spatial and temporal extent when available (#185).
## 2.0.0
diff --git a/src/hakunapi-html/src/main/resources/fi/nls/hakunapi/html/collectionInfo.ftl b/src/hakunapi-html/src/main/resources/fi/nls/hakunapi/html/collectionInfo.ftl
index 5618d890..bec2f230 100644
--- a/src/hakunapi-html/src/main/resources/fi/nls/hakunapi/html/collectionInfo.ftl
+++ b/src/hakunapi-html/src/main/resources/fi/nls/hakunapi/html/collectionInfo.ftl
@@ -61,6 +61,25 @@
${model.storageCrs}
#if>
+ <#if model.extent??>
+ <#if model.extent.spatialExtent??>
+ Spatial extent
+
+ <#list model.extent.spatialExtent.bbox as bbox>
+ - <#list bbox as v>${v?c}<#sep>, #list> (${model.extent.spatialExtent.crs!""})
+ #list>
+
+ #if>
+ <#if model.extent.temporalExtent??>
+ Temporal extent
+
+ <#list model.extent.temporalExtent.interval as interval>
+ - ${(interval[0])!"..."} / ${(interval[1])!"..."}
+ #list>
+
+ #if>
+ #if>
+
Queryable properties
Find out properties usable in filters
diff --git a/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/java/fi/nls/hakunapi/simple/webapp/jakarta/features/CollectionPageHtmlTest.java b/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/java/fi/nls/hakunapi/simple/webapp/jakarta/features/CollectionPageHtmlTest.java
new file mode 100644
index 00000000..9b6fbfc3
--- /dev/null
+++ b/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/java/fi/nls/hakunapi/simple/webapp/jakarta/features/CollectionPageHtmlTest.java
@@ -0,0 +1,54 @@
+package fi.nls.hakunapi.simple.webapp.jakarta.features;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.not;
+
+import java.io.File;
+
+import jakarta.servlet.ServletContextEvent;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.MediaType;
+
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.Test;
+
+import fi.nls.hakunapi.simple.webapp.jakarta.HakunaContextListener;
+import fi.nls.hakunapi.simple.webapp.jakarta.HakunaTestServletContext;
+import fi.nls.hakunapi.simple.webapp.jakarta.SimpleFeaturesApplication;
+
+public class CollectionPageHtmlTest extends JerseyTest {
+
+ @Override
+ protected Application configure() {
+ File file = new File(getClass().getClassLoader().getResource("hakuna_html_map/hakuna.properties").getFile());
+ System.setProperty("hakuna.config.path", file.getParentFile().getAbsolutePath() + "/");
+
+ HakunaTestServletContext sc = new HakunaTestServletContext();
+ new HakunaContextListener().contextInitialized(new ServletContextEvent(sc));
+ return new SimpleFeaturesApplication(sc);
+ }
+
+ private String html(String collectionId) {
+ return target("/collections/" + collectionId).request(MediaType.TEXT_HTML).get(String.class);
+ }
+
+ @Test
+ public void testSchemaLinkAndSpatialExtent() {
+ String page = html("fence");
+
+ assertThat(page, containsString("href=\"collections/fence/schema\""));
+ assertThat(page, containsString("Spatial extent"));
+ assertThat(page, containsString("-110, -60, 140, 30"));
+ assertThat(page, not(containsString("Temporal extent")));
+ }
+
+ @Test
+ public void testTemporalExtent() {
+ String page = html("survey");
+
+ assertThat(page, containsString("Temporal extent"));
+ assertThat(page, containsString("2020-01-01T00:00:00Z / 2021-01-01T00:00:00Z"));
+ }
+
+}
diff --git a/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/resources/hakuna_html_map/hakuna.properties b/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/resources/hakuna_html_map/hakuna.properties
index 819c0306..c0e65971 100644
--- a/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/resources/hakuna_html_map/hakuna.properties
+++ b/webapp-jakarta/hakunapi-simple-webapp-test-jakarta/src/test/resources/hakuna_html_map/hakuna.properties
@@ -23,8 +23,16 @@ srid=3067,3857
srid.3067.proj4=+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
default.collections.srid=3067,3857
-collections=fence
+collections=fence,survey
collections.fence.geometry.type=POINT
collections.fence.properties=name
+collections.fence.extent.spatial.crs84=-110,-60,140,30
collections.fence.testdata.1=1;POINT(1 1);Fence A
+
+collections.survey.geometry.type=POINT
+collections.survey.properties=name,surveyed
+collections.survey.properties.surveyed.type=DATE
+collections.survey.time=surveyed
+collections.survey.extent.temporal=2020-01-01T00:00:00Z,2021-01-01T00:00:00Z
+collections.survey.testdata.1=1;POINT(2 2);Survey A;2020-06-01