{# The table, its pagination and its empty states. Rendered on its own when the list updates live, and included by list.html otherwise, so both paths render exactly the same markup from exactly the same context. A separate "partial" template is how the two quietly drift apart. #} {% if drilldown %} {# Above the table and inside the fragment, so a live search redraws the links with the new term in them -- a bar drawn once at page load would carry the old one and undo the search on the next click. #} {% endif %} {% if page.items %} {# Editing in place makes the whole table one form with one Save button. A control per row posting on its own would be one request per cell and nothing to submit it with when scripting is off -- Django's `list_editable` is the same shape for the same reason. Inside `#ff-results`, so a live update replaces the form along with the rows it wraps. #} {% if list_edit_url %}
{% endif %} {% if favorite_url %} {# One form for every star on the page, referenced by `form="ff-star"` from each button. Outside the `list_editable` form on purpose -- a form inside a form is markup no browser keeps. `next` returns to this list with its filters and page intact; it is validated server-side against the open-redirect it otherwise would be. #} {% endif %} {% else %}{{ _("Nothing matches the current search and filters.") }}
{{ ff_icon("filter-off", size=15) }} {{ _("Clear search and filters") }} {% else %}{{ _("Nothing has been added to {name} yet.", name=model_title|lower)|ff_sentence }}
{% if add_url %} {{ ff_icon("plus", size=15) }} {{ _("Add the first {name}", name=model_singular|lower) }} {% endif %} {% endif %}