Skip to content

Commit 340567b

Browse files
committed
fix temporal display on item HTML (#1203)
1 parent d029352 commit 340567b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

pycsw/templates/item.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,19 @@ <h2>{{ data.get('properties',{}).get('title',data['id']) }}</h2>
131131
<tr>
132132
<td>Temporal</td>
133133
<td>
134+
{% if data['time'].get('date') %}
135+
{{ data['time']['date'] }}
136+
{% elif data['time'].get('timestamp') %}
137+
{{ data['time']['timestamp'] }}
138+
{% elif data['time'].get('interval') %}
134139
<ul>
135-
{% if data['time'] is string %}
136-
<li>{{ data['time'] }}</li>
137-
{% else %}
138-
{% for d in data['time'] %}
139-
<li>{{ d }}</li>
140-
{% endfor %}
141-
{% endif %}
140+
<li>begin: {{ data['time']['interval'][0] }}</li>
141+
<li>end: {{ data['time']['interval'][1] }}</li>
142142
</ul>
143+
{% endif %}
144+
{% if data['time'].get('resolution') %}
145+
Resolution: {{ data['time']['resolution'] }}
146+
{% endif %}
143147
</td>
144148
</tr>
145149
{% endif %}

0 commit comments

Comments
 (0)