{%- macro _actionLink(action) %} {{ action.html | safe if action.html else action.text }} {%- if action.visuallyHiddenText -%} {{ action.visuallyHiddenText }} {% endif -%} {% endmacro -%} {# Determine if we need 2 or 3 columns #} {% set anyRowHasActions = false %} {% for row in params.rows %} {% set anyRowHasActions = true if row.actions.items | length else anyRowHasActions %} {% endfor -%}
{% for row in params.rows %} {% if row %}
{{ row.key.html | safe if row.key.html else row.key.text }}
{{ row.value.html | indent(8) | trim | safe if row.value.html else row.value.text }}
{% if row.actions.items.length %}
{% if row.actions.items.length == 1 %} {{ _actionLink(row.actions.items[0]) | indent(12) | trim }} {% else %}
    {% for action in row.actions.items %}
  • {{ _actionLink(action) | indent(18) | trim }}
  • {% endfor %}
{% endif %}
{% elseif anyRowHasActions %} {# Add dummy column to extend border #} {% endif %}
{% endif %} {% endfor %}