Skip to content

Commit e3295df

Browse files
author
paul van genuchten
committed
displays the collection type in list (geopython#579)
* displays the collection type in list * fix key in link improve param name
1 parent ccc42af commit e3295df

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pygeoapi/templates/collections.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ <h1>Collections in this service</h1>
1010
<thead>
1111
<tr>
1212
<th>Name</th>
13+
<th>Type</th>
1314
<th>Description</th>
1415
</tr>
1516
</thead>
1617
<tbody>
17-
{% for k, v in filter_dict_by_key_value(config['resources'], 'type', 'collection').items() %}
18+
{% for col in data['collections'] %}
1819
<tr>
1920
<td data-label="name">
20-
<a title="{{ v['title'] | striptags | truncate }}"
21-
href="{{ config['server']['url'] }}/collections/{{ k }}">
22-
<span>{{ v['title'] | striptags | truncate }}</span></a>
21+
<a title="{{ col['title'] | striptags | truncate }}"
22+
href="{{ config['server']['url'] }}/collections/{{ col.id }}">
23+
<span>{{ col['title'] | striptags | truncate }}</span></a>
2324
</td>
25+
<td data-label="type">{{ col["itemType"] }}</td>
2426
<td data-label="description">
25-
{{ v['description'] | striptags | truncate }}
27+
{{ col['description'] | striptags | truncate }}
2628
</td>
2729
</tr>
2830
{% endfor %}

0 commit comments

Comments
 (0)