{# query_result.html #}

{% extends "base.html" %}

{% block content %}

    {% include "query_nav.html" %}

    <h1>Results</h1>

    {% include "expand_collapse_buttons.html" %}

    <table>
        <tr>
            <th></th>
            {% for field in fieldnames %}
                <th>{{ field }}</th>
            {% endfor %}
        </tr>
        {% for row in rows %}
            <tr>
                <td><i>{{ rows.start_index|add:forloop.counter0 }}</i></td>
                {% for col in row %}
                    <td class="queryresult">{{ col|safe }}</td>
                {% endfor %}
            </tr>
        {% endfor %}
    </table>

    {% include "page_nav_results.html" with items=rows %}

    <h1>SQL</h1>
    <pre>{{ sql }}</pre>

    {% comment %}
    <h1>Highlighting</h1>
    <ul>
        {% for h in highlight_descriptions %}
            <li>{{ h|safe }}</li>
        {% endfor %}
    </ul>
    {% endcomment %}

{% endblock %}
