{% macro action_data_attributes(action) -%} {% if action.is_link -%} href="{{ view._row_actions_handlers.get(action.name) (request, pk) }}" {% else %} href="#" {% if action.confirmation is not none -%} data-bs-toggle="modal" data-bs-target="#modal-action" data-sa-confirmation="{{ action.confirmation }}" data-sa-header="{{ action.header or '' }}" data-sa-modal-size="{{ action.modal_size or 'sm' }}" {% else %} data-sa-no-confirmation-action="true" {% endif %} {% if action.custom_response -%} data-sa-custom-response="true" {% endif %} data-sa-submit-btn-text="{{ action.submit_btn_text }}" data-sa-submit-btn-class="{{ cls(action.submit_btn_class) if action.submit_btn_class else '' }}" data-sa-form="{{ action.form |forceescape }}" {% endif %} data-sa-is-row-action="true" data-sa-name="{{ action.name }}" {% endmacro %} {% if display_type == "ICON_LIST" -%}
{% for action in _actions -%} {% endfor %}
{% elif display_type == "DROPDOWN" -%} {% elif display_type == "KEBAB" -%} {% elif display_type == "INLINE_LINKS" -%}
{% for action in _actions -%} {% if not loop.first -%} {% endif -%} {% if action.icon_class -%} {% endif -%} {{ action.text }} {% endfor %}
{% else -%} {# For detail page #}
{% for action in _actions -%} {% if action.icon_class -%} {% endif -%} {{ action.text }} {% endfor %}
{% endif %}