summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2020-06-09 01:31:34 +0200
committerAdam Tauber <asciimoo@gmail.com>2020-06-09 01:31:57 +0200
commit785f0938fdc6c0b587d5f416f005ab5046260ba6 (patch)
tree3931c85af15ff66286363e1310e2812fbbb76ac3
parentd5e146251f8a7de7790653105eefd4f95b54943f (diff)
[fix] add link to wikidata entities in infobox - fixes #1097
-rw-r--r--searx/templates/oscar/infobox.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
index 9802f11e..de595b92 100644
--- a/searx/templates/oscar/infobox.html
+++ b/searx/templates/oscar/infobox.html
@@ -16,7 +16,11 @@
{%- if attribute.image -%}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{%- else -%}
- <td><bdi>{{ attribute.value }}</bdi></td>
+ {% if attribute.label == 'Instance of' %}
+ <td><bdi><a href="https://wikidata.org/wiki/{{ attribute.value.id }}">{{ attribute.value.id }}</a></bdi></td>
+ {% else %}
+ <td><bdi>{{ attribute.value }}</bdi></td>
+ {%- endif -%}
{%- endif -%}
</tr>
{% endfor -%}