{# @description List-view wrapper: renders each object into a grid using the given row template, or the empty state. #} {# @prop list:text | description:"The queryset or list of objects to render." #} {# @prop empty_state:text | description:"Dict of attributes forwarded to the empty state when the list has no results." #} {# @prop card:text | description:"Template name each row is rendered with." #} {# @prop empty:text | description:"Shown in place of the results when there are none. Defaults to the packaged empty state." #} {% load mvp %} {% comment %} The empty state is drawn outside the grid: inside it, it would be one grid item and sit in the first column. {% endcomment %} {% if list %} {% for object in list %} {% render_list_item object card %} {% endfor %} {% else %} {% if empty|slot_is_empty is False %} {{ empty }} {% else %} {% endif %} {% endif %}