{# @description The row above a list's results: search, the result count, then the controls. One row from md, two on a phone. Renders nothing when the list has no records and nothing is applied. #} {# @prop search:text | description:"The search box. Takes the whole first row on a phone." #} {# @prop summary:text | description:"The line that says what the list holds." #} {# @prop class:text | description:"Extra classes on the toolbar's root element." #} {# @prop result_count:number | description:"How many records the list holds; with no refinements, none draws no toolbar." #} {# @prop refinements:text | description:"The search and filters applied now." #} {# @prop bare:boolean | description:"Draw the slot as the row itself, with no search or summary cells; the list page's filter form lays the row out this way." #} {# @slot Sort, filter, add — the controls at the end of the row. #} {% load i18n mvp %} {% if result_count or refinements %} {% comment %} One source order at every width: search, count, controls. Below md the search takes the whole first row and the other two share the second. Below sm the controls sit closer, so a phone fits two filters, the sort and the add button on that row. {% endcomment %}
{% if bare %} {{ slot }} {% else %} {% if not search|slot_is_empty %}
{{ search }}
{% endif %}
{{ summary }}
{{ slot }}
{% endif %}
{% endif %}