Fix for items without a label

This commit is contained in:
Edward Betts 2019-09-30 14:23:32 +01:00
parent af4bdb956b
commit bb6096927b

View file

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ label }} ({{qid }}){% endblock %} {% block title %}{{ label or 'no label' }} ({{qid }}){% endblock %}
{% block style %} {% block style %}
<style> <style>
@ -13,6 +13,7 @@
<div class="d-flex"> <div class="d-flex">
<div class="p-2 flex-fill"> <div class="p-2 flex-fill">
<h1>{{ self.title() }}</h1> <h1>{{ self.title() }}</h1>
{% if label_languages %}
<p>Label from: <p>Label from:
{% for lang in label_languages %} {% for lang in label_languages %}
{{ lang.label }} ({{ lang.code }}) {{ lang.label }} ({{ lang.code }})
@ -21,6 +22,7 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</p> </p>
{% endif %}
<p> <p>
<a href="https://www.wikidata.org/wiki/{{ qid }}">view this painting on Wikidata</a> <a href="https://www.wikidata.org/wiki/{{ qid }}">view this painting on Wikidata</a>