{% macro govukSummaryList(params) %} {%- 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 ns = namespace(anyRowHasActions = False) %} {% for row in params.rows %} {% set ns.anyRowHasActions = True if row.actions and row.actions['items'] | length else ns.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 and row.actions['items'] | length %}
{% if row.actions and 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 %}
{% endif %}
{% endif %} {% endfor %}
{% endmacro %}