2016-10-05 18:11:28 +02:00
|
|
|
{% extends "main.html" %}
|
|
|
|
{% block title %}Search{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="container">
|
|
|
|
<h1>Search {% if query %} - {{query}} {%endif%}</h1>
|
|
|
|
|
2016-10-12 16:35:54 +02:00
|
|
|
<form class="form-inline" action="search" method=post>
|
|
|
|
{{ form.csrf_token }}
|
|
|
|
{{ form.query(size=20) }}
|
|
|
|
<input type="submit" value="Search">
|
2016-10-05 18:11:28 +02:00
|
|
|
</form>
|
|
|
|
</br>
|
|
|
|
<div>
|
|
|
|
{% if query and not entries %}
|
|
|
|
Nothing found
|
|
|
|
{%endif%}
|
|
|
|
{% if entries %}
|
|
|
|
<table class="table table-striped table-bordered" id="pytaxonomies_table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Machinetag</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Machinetag</th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
|
|
{% for mt, val in entries.items() %}
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ url_for('taxonomies', name=val[0].name) }}">{{ val[0].name }}</a></td>
|
|
|
|
<td>
|
|
|
|
{% if val|length == 3 %}
|
|
|
|
{% if val[2].description %}
|
2016-10-12 16:35:54 +02:00
|
|
|
{{ val[2].description }}
|
2016-10-05 18:11:28 +02:00
|
|
|
{% elif val[2].expanded %}
|
2016-10-12 16:35:54 +02:00
|
|
|
{{ val[2].expanded }}
|
2016-10-05 18:11:28 +02:00
|
|
|
{%endif%}
|
|
|
|
{% elif val[1].description %}
|
2016-10-12 16:35:54 +02:00
|
|
|
{{ val[1].description }}
|
2016-10-05 18:11:28 +02:00
|
|
|
{% else %}
|
|
|
|
{{ val[1].predicate }}
|
|
|
|
{%endif%}
|
|
|
|
</td>
|
|
|
|
<td>{{ mt }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{%endif%}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|