owl-map/templates/isa.html

95 lines
2.3 KiB
HTML
Raw Permalink Normal View History

2021-10-22 10:02:52 +01:00
{% extends "base.html" %}
{% block title %}{{ item.label() }} ({{ item.qid }}) {% endblock %}
{% block content %}
<div class="container my-2">
2023-05-13 14:01:28 +01:00
{% include "flash_msg.html" %}
2021-10-22 10:02:52 +01:00
<h1>{{ self.title() }}</h1>
<div><a href="https://www.wikidata.org/wiki/{{ item.qid }}">
view on Wikidata
<i class="fa fa-external-link"></i>
</a></div>
<div class="my-2">
2023-05-13 14:01:28 +01:00
<form method="GET" action="{{ url_for("refresh_item", item_id=item.item_id) }}">
2021-10-22 10:02:52 +01:00
<input type="hidden" name="action" value="refresh">
<input type="submit" value="refresh item" class="btn btn-sm btn-primary">
</form>
</div>
{% set description = item.description() %}
{% set aliases = item.get_aliases() %}
{% set osm_tag_list = item.get_claim("P1282") %}
<div class="my-3">
{% if description %}
<strong>description</strong>:
{{ description }}<br>
{% endif %}
{% if aliases %}
<strong>aliases</strong>:
{{ aliases | join("; ") }}
{% endif %}
</div>
{#
<h4>tags</h4>
<pre>{{ tags | pprint }}</pre>
#}
2021-10-22 10:02:52 +01:00
<h4>subclass of</h4>
<div class="mb-3">
{% if subclass_list %}
{% for subclass in subclass_list %}
<a href="{{ subclass.isa_page_url }}">{{ subclass.label }}</a>
({{ subclass.qid }})
&ndash; {{ subclass.description }}
<br>
{% endfor %}
{% else %}
<p>no subclasses</p>
{% endif %}
</div>
<h4>OpenStreetMap tags/keys from Wikidata</h4>
{% if osm_tag_list %}
<ul>
{% for tag_or_key in osm_tag_list %}
<li>{{ tag_or_key }}</li>
{% endfor %}
</ul>
{% else %}
<p>no tags/keys from Wikidata</p>
{% endif %}
<h4>extra OpenStreetMap tags/keys</h4>
<p>Sometimes the OSM tags/keys are insufficient to find a good match, so this tool includes an exta tags/keys to check.</p>
2021-10-22 10:02:52 +01:00
{% if extra %}
<ul>
{% for tag_or_key in extra %}
<li>{{ tag_or_key }} <a href="#">🗙 remove</a></li>
{% endfor %}
</ul>
{% else %}
<p>no extra tags/keys</p>
{% endif %}
<form method="POST" class="row row-cols-lg-auto g-3 align-items-center">
<div class="col-12">
<div class="input-group">
<input class="form-control" id="tag-or-key" name="tag_or_key" placeholder="tag or key">
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">add</button>
</div>
</form>
</div>
{% endblock %}