{% load nitro_tags %} {# ==================== QUICK ACTION HOVER STYLES ==================== #} {% if object_list %} {# ==================== DESKTOP TABLE ==================== #} {# ==================== MOBILE CARDS ==================== #}
{% for obj in object_list %}
{% for column in columns %} {% if column.mobile %} {% if forloop.first and column.link %}
{{ obj|table_cell:column }} {% if column.icon and column.icon_field and column.icon_link %} {% if obj|has_icon_field:column %} {% if column.icon == 'location' %} {% endif %} {% endif %} {% endif %}
{% if column.subtitle_field %} {% with subtitle=obj|get_subtitle:column %} {% if subtitle %}
{{ subtitle }}
{% endif %} {% endwith %} {% endif %}
{% elif forloop.first %}
{{ obj|table_cell:column }} {% if column.icon and column.icon_field and column.icon_link %} {% if obj|has_icon_field:column %} {% if column.icon == 'location' %} {% endif %} {% endif %} {% endif %}
{% if column.subtitle_field %} {% with subtitle=obj|get_subtitle:column %} {% if subtitle %}
{{ subtitle }}
{% endif %} {% endwith %} {% endif %}
{% else %}
{% if column.mobile_label %} {{ column.label }} {% endif %} {{ obj|table_cell:column }}
{% endif %} {% endif %} {% endfor %}
{# Mobile: Quick Actions as icon buttons + Row Actions #} {% if quick_actions or row_actions %}
{# Quick Actions - Icon row #} {% if quick_actions %}
{% for action in quick_actions %} {% if obj|quick_action_visible:action %} {% with external_url=obj|quick_action_url:action %} {% if external_url %} {% quick_action_icon action.icon %} {% elif action.hx_post %} {% elif action.hx_get %} {% elif action.url_name %} {% quick_action_icon action.icon %} {% endif %} {% endwith %} {% endif %} {% endfor %}
{% endif %} {# Row Actions - Text buttons #} {% if row_actions %}
{% for action in row_actions %} {% if action.method == 'post' %} {% elif action.method == 'link' %} {{ action.label }} {% else %} {% endif %} {% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{# ==================== PAGINATION ==================== #} {% if page_obj %} {% nitro_pagination page_obj target=target %} {% endif %} {% else %} {% nitro_empty_state %} {% endif %}