{# The question index, in one place, because the run page and every filter page hold it. A filter page is the run page's index with rows left out, so the markup of that index exists once and both callers render it through this macro. `root` is what a page has to put in front of a question's own path to reach it: nothing on the run page, one step up from `not-equal/`, two from `by-mechanism//`. A run with no question at all renders the sentence rather than an empty table: the rows table beside it has said `no rows` since it was written, and a reader meeting a table with nothing under its headings cannot tell a run that audited nothing from a page that failed to list what it audited. #} {% macro index_table(entries, root) %}
{% for entry in entries %} {% else %} {% endfor %}
question rule verdict class probes what was asked
{% if entry.href %}q{{ entry.question_id }}{% else %}q{{ entry.question_id }}{% endif %} {{ entry.replay_rule }} {{ entry.verdict }} {% if entry.mechanism %}{{ entry.mechanism }}{% endif %} {% for probe in entry.probes %}{{ probe }} {% endfor %} {% if entry.note %}{{ entry.note }}{% else %}{{ entry.question_text }}{% endif %}
no questions
{% endmacro %}