{% extends "base.html" %}

{% block content %}
    <h5 class="card-header">Gilda</h5>
    <div class="card-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 %}
