{% extends "base.html" %}

{% block gcontent %}
<div class="panel-heading">
    <h3 class="panel-title">Gilda</h3>
</div>
<div class="panel-body">
    <p>
        Results for <code>{{ form.text.data }}</code>
        {% if form.context.data %} with context
        <i>{{ form.context.data }}</i>{% endif %}
    </p>
</div>
<table class="table table-striped table-hover">
    <thead>
    <tr>
        <th>Database</th>
        <th>Identifier</th>
        <th>Name</th>
        <th>Score</th>
    </tr>
    </thead>
    <tbody>
    {% for match in matches %}
    <tr>
        <td>{{ match['term']['db'] }}</td>
        <td>{{ match['term']['id'] }}</td>
        <td>{{ match['term']['entry_name'] }}</td>
        <td class="text-right">{{ match['score'] | round(4)}}</td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% endblock %}
