{#- A picker: one box to type in. The records it holds sit in it as chips, in the order they were chosen, and a list opens under it as soon as it is clicked or typed in. With `picker_options` the whole list is in the page and narrows as you type; without, it is searched on the server, as a link to over a hundred records is. `picker_multiple` holds several, and `picker_ordered` shows them as numbered rows to put in order, with the box under them for adding one. `picker_hint` is the box's placeholder, and `picker_search` the one a link to one record shows while searching. -#} {% import "adminsite/_icons.html" as icons %} {%- set list_id = "options-" ~ (row.id_prefix ~ row.path)|replace(".", "-") -%} {%- set ordered = picker_ordered|default(false) -%} {%- set local = picker_options is not none -%} {#- Single quotes, because the chosen records are written in as JSON and their names hold double quotes. -#}
{% if ordered %} {#- In the order the link keeps them: numbered, each moved up or down by its buttons, or dragged onto another's place. -#}
{% endif %} {#- A press anywhere in the box goes to the text in it, as in any input. -#}
{% if ordered %} {{ icons.icon("plus", 16) }} {% elif picker_multiple %} {% endif %} {% if not picker_multiple %} {% if not row.required %} {% endif %} {{ icons.icon("chevron-down", 16) }} {% endif %}
{#- Inside a dialog, or an inline table that scrolls sideways, the list takes its place and the dialog or row grows, since either would cut off anything floating past its edge. A press on it keeps the typing in the box. -#}

{{ _('Nothing found.') }}

{% if not local %}

{{ _('More records match. Type to narrow.') }}

{% endif %}