depicts/templates/catalog.html

43 lines
1 KiB
HTML

{% 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>
{% 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 %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}