From c46972dcf66b90674623b1e8eb90c6cf428be057 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Tue, 25 Apr 2023 12:44:31 -0400 Subject: [PATCH] add license section to collection if rel=license exists (#1230) --- pygeoapi/templates/collections/collection.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pygeoapi/templates/collections/collection.html b/pygeoapi/templates/collections/collection.html index 61288cb..a434184 100644 --- a/pygeoapi/templates/collections/collection.html +++ b/pygeoapi/templates/collections/collection.html @@ -30,6 +30,23 @@
+ + {% set ns = namespace(header_printed=false) %} + {% for link in data['links'] %} + {% if link['rel'] == 'license' %} + {% if not ns.header_printed %} +

{% trans %}License{% endtrans %}

+ {% set ns.header_printed = true %} + {% endif %} + + {% endif %} + {% endfor %} + {% if data['itemType'] == 'feature' or data['itemType'] == 'record' %}

{% trans %}Browse{% endtrans %}