{% load nitro_tags %} {# ==================== QUICK ACTION HOVER STYLES ==================== #} {% if object_list %} {# ==================== DESKTOP TABLE ==================== #}
| {% if column.sortable %} {% nitro_sort column.field column.label current_sort=current_sort target=target %} {% else %} {{ column.label }} {% endif %} | {% endfor %} {% if row_actions or quick_actions %}Acciones | {% endif %}
|---|---|
|
{% if column.link %}
{{ obj|table_cell:column }}
{% else %}
{{ obj|table_cell:column }}
{% endif %}
{% 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 %}
|
{% endfor %}
{% if row_actions or quick_actions %}
{# Quick Actions - Icon buttons on hover #}
{% 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 %}
{# External URL (e.g., WhatsApp wa.me link) #}
{% quick_action_icon action.icon %}
{% elif action.hx_post %}
{# HTMX POST action #}
{% elif action.hx_get %}
{# HTMX GET action (slideover) #}
{% elif action.url_name %}
{# Regular link #}
{% 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 %}{# method == 'get' -> slideover/HTMX #}
{% endif %}
{% endfor %}
{% endif %}
|
{% endif %}