Skip to content

Commit

Permalink
update property table, to include title, description, type, but in a …
Browse files Browse the repository at this point in the history
…truncated form
  • Loading branch information
pvgenuchten committed Feb 27, 2024
1 parent d608e02 commit 91e7dfc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pycsw/ogc/api/templates/item.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<div class="container-fluid">
<div class="row pb-3">
<div class="col-lg-12">
<small>{{ data.get('properties',{}).get('type','') | capitalize }}</small>
<small class="text-primary fw-bold">{{ (data.get('properties',{}).get('type') or '').split('/').pop() | capitalize }}</small>
<h2>{{ data.get('properties',{}).get('title',data['id']) }}</h2>
<p>{{ data.get('properties',{}).get('description','') }}</p>
<p>{{ data.get('properties',{}).get('description','') | urlize }}</p>
</div>
</div>

Expand All @@ -46,7 +46,6 @@ <h2>{{ data.get('properties',{}).get('title',data['id']) }}</h2>
<tbody>
{% if 'properties' in data %}
{% for key, value in data['properties'].items() %}
{% if key not in ['title', 'description', 'type'] %}
<tr>
<td>{{ key | capitalize }}</td>
{% if key == 'keywords' or key == 'formats' %}
Expand Down Expand Up @@ -111,10 +110,13 @@ <h2>{{ data.get('properties',{}).get('title',data['id']) }}</h2>
{% endfor %}
</td>
{% else %}
<td>{{ value }}</td>
{% if key in ['title','description'] %}
<td>{{ value | truncate(80, False, '...') }}</td>
{% else %}
<td>{{ value | urlize }}</td>
{% endif %}
{% endif %}
</tr>
{% endif %}
{% endfor %}
{% endif %}
{% if data['time'] %}
Expand Down

0 comments on commit 91e7dfc

Please sign in to comment.