Skip to content

Commit

Permalink
displays the collection type in list (#579)
Browse files Browse the repository at this point in the history
* displays the collection type in list

* fix key in link
improve param name
  • Loading branch information
paul van genuchten authored Nov 28, 2020
1 parent 1bbcb91 commit 8c699a1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pygeoapi/templates/collections.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ <h1>Collections in this service</h1>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for k, v in filter_dict_by_key_value(config['resources'], 'type', 'collection').items() %}
{% for col in data['collections'] %}
<tr>
<td data-label="name">
<a title="{{ v['title'] | striptags | truncate }}"
href="{{ config['server']['url'] }}/collections/{{ k }}">
<span>{{ v['title'] | striptags | truncate }}</span></a>
<a title="{{ col['title'] | striptags | truncate }}"
href="{{ config['server']['url'] }}/collections/{{ col.id }}">
<span>{{ col['title'] | striptags | truncate }}</span></a>
</td>
<td data-label="type">{{ col["itemType"] }}</td>
<td data-label="description">
{{ v['description'] | striptags | truncate }}
{{ col['description'] | striptags | truncate }}
</td>
</tr>
{% endfor %}
Expand Down

0 comments on commit 8c699a1

Please sign in to comment.