depicts/templates/catalog.html

43 lines
1 KiB
HTML
Raw Normal View History

2019-10-10 17:44:21 +01:00
{% extends "base.html" %}
{% block style %}
<style>
td { vertical-align: top; }
</style>
{% endblock %}
{% block content %}
<div class="p-2">
<table>
{% for item in items %}
<tr>
<td>
<img src="{{ item.image.thumburl }}">
</td>
<td>
<p>{{ item.label }}</p>
2019-10-10 20:52:11 +01:00
{% for key, prop_label in labels.items() %}
{% set claims = item.entity['claims'][key] %}
{% if claims %}
<div>
<strong>{{ prop_label }}</strong>:
{% for claim in claims %}
{% if 'datavalue' in claim.mainsnak %}
{% set claim_qid = claim.mainsnak.datavalue.value.id %}
<a href="https://www.wikidata.org/wiki/{{ claim_qid }}">{{ other[claim_qid] or '[ label missing ]' }}</a> ({{ claim_qid }})
{% else %}
<i>no value</i>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}
2019-10-10 17:44:21 +01:00
</td>
</tr>
{% endfor %}
2019-10-10 20:52:11 +01:00
</table>
2019-10-10 17:44:21 +01:00
</div>
{% endblock %}