{% extends 'layout.html' %}

{% block title %}Recherche{% endblock %}
{% block content %}
    <div class="block">
        <h1 class="title is-1">Résultats de recherche</h1>
    </div>
    {% for result in search_results %}
        <div class="block">
            <a href="{{ url_for('ookcatalog.table', schema=result['table_schema'], table=result['table_name']) }}">
                <div class="message is-link">
                    <div class="message-header">{{ result['table_schema'] }}.{{ result['table_name'] }}</div>
                    {% if result['table_comment'] %}
                        <div class="message-body">{{ result['table_comment'] }}</div>
                    {% endif %}
                </div>
            </a>
        </div>
    {% endfor %}
{% endblock %}