{% macro digitalmarketplaceSummaryContentFormula(params) %} {%- from "govuk_frontend_jinja/components/summary-list/macro.html" import govukSummaryList -%} {%- if params.value -%} {%- set summaryListRows = [] -%} {%- for question in params.value %} {%- if question.operation and question.operation_position == "before" -%} {%- set _summaryListRows = summaryListRows.append({ "key": { "text": question.operation }, "value": { "text": '' } }) -%} {%- endif -%} {%- set _summaryListRows = summaryListRows.append({ "key": { "text": question.name if question.name else question.question }, "value": { 'text': question.value } }) -%} {%- if question.operation and question.operation_position == "after" -%} {%- set _summaryListRows = summaryListRows.append({ "key": { "text": question.operation }, "value": { "text": '' } }) -%} {%- endif -%} {%- endfor -%}
{{ govukSummaryList({ "rows": summaryListRows, "classes": 'dm-summary-content-formula' }) }}
{%- endif -%} {% endmacro %}