{# The operation table of step 2, and the line that counts it (spec ยง7.1). Returned on its own as the answer to a filter or a bulk button, which is why it is a template rather than a macro and why it starts at the element htmx replaces. Its context is ``picker``, ``picker_id`` and ``picker_target``, which is what ``routes_ui._picker_context`` exists to build. The filter controls are deliberately *outside* this region. Swapping an input the operator is typing in would move the caret out from under them; swapping only what the filter decides leaves the controls where they were put. A filtered-out row is hidden, not dropped. Its checkbox is still in the form and still carries what was ticked, so narrowing the table can never quietly unselect anything. #} {% from "partials/status_badge.html" import status_badge %}
{{ picker.summary }}
| {# Ticks the rows the filter is showing, and only those. Ships hidden and is unhidden by ``table.js``: it moves ticks in the page and writes nothing itself, so with no script it would be a box that does nothing. Nothing is lost โ the two bulk buttons are rendered in that case, and rows are still ticked one at a time (task 115). #} | Method | Path | {# No Summary column. The cell beside it is a box now, and a column of prose next to a control makes the control the narrowest thing on the row โ which is why the detail page lost its Description column at task 116. The sentence did not go: it is under the path, where that table already puts one (task 118). #}Name |
|---|---|---|---|
{{ row.method }} |
{{ row.path }}
{% for tag in row.tags %}
{{ tag }}
{% endfor %}
{# What the document says this endpoint does, where the detail page
puts the same sentence. No fallback to the ``operationId``: the box
in the next cell is showing it, since sanitising only takes out
what a tool name may not contain (task 118). #}
{% if row.summary %}
{{ row.summary }}
{% endif %}
|
{# The prefix as the slot it is rather than as it stood when this page
last rendered: the box above is typed in without posting, and a
name that claimed a prefix nobody has any more would be worse than
one that says where the prefix goes. This is the one thing this
cell does differently from the same cell on the detail page, where
the prefix is saved before the table is rendered against it. Shown
whole where a slot would not be true โ a cleared prefix, or a name
that had to be cut down (tasks 115 and 118). #}
{% if row.stem is not none %}
<prefix>__
{% endif %}
{% if row.conflict %}
{{ status_badge("error", label="Name taken", title=row.conflict) }}
{% endif %}
{% if row.error %}
{{ row.error }}
{% endif %}
|
|
| Nothing here matches the filter. Everything ticked is still ticked. | |||