{% load i18n wagtailadmin_tags %}
<table class="listing chooser">
    <col width="50%"/>
    <col width="50%"/>
    <thead>
        <tr>
            <th class="title">{% trans "Terms" %}</th>
            <th>{% trans "Views (past week)" %}</th>
        </tr>
    </thead>
    <tbody>
        {% if queries %}
            {% for query in queries %}
                <tr>
                    <td class="title">
                        <h2><a class="choose-query" href="#{{ query.id }}" data-id="{{ query.id }}" data-querystring="{{ query.query_string }}">{{ query.query_string }}</a></h2>
                    </td>
                    <td>{{ query.hits }}</td>
                </tr>
            {% endfor %}
        {% else %}
            <tr><td colspan="100%" class="no-results-message"><p>{% trans "No results found" %}</p></td></tr>
        {% endif %}
    </tbody>
</table>

{% paginate queries %}
