Sha256: fc32e0400d82d0dd6d786c62fc57207ea0ccc27d98c5f0a83108bf5755c29d51

Contents?: true

Size: 1.6 KB

Versions: 16

Compression:

Stored size: 1.6 KB

Contents

{%- macro _actionLink(action) %}
  <a class="govuk-link" href="{{ action.href }}">
    {{ action.html | safe if action.html else action.text }}
    {%- if action.visuallyHiddenText -%}
      <span class="govuk-visually-hidden"> {{ action.visuallyHiddenText }}</span>
    {% endif -%}
  </a>
{% endmacro -%}
<dl class="govuk-summary-list {%- if params.classes %} {{ params.classes }}{% endif %}"{% for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
  {% for row in params.rows %}
    <div class="govuk-summary-list__row">
      <dt class="govuk-summary-list__key {%- if row.key.classes %} {{ row.key.classes }}{% endif %}">
        {{ row.key.html | safe if row.key.html else row.key.text }}
      </dt>
      <dd class="govuk-summary-list__value {%- if row.value.classes %} {{ row.value.classes }}{% endif %}">
        {{ row.value.html | indent(8) | trim | safe if row.value.html else row.value.text }}
      </dd>
      {% if row.actions.items %}
        <dd class="govuk-summary-list__actions {%- if row.actions.classes %} {{ row.actions.classes }}{% endif %}">
          {% if row.actions.items.length == 1 %}
            {{ _actionLink(row.actions.items[0]) | indent(12) | trim }}
          {% else %}
            <ul class="govuk-summary-list__actions-list">
              {% for action in row.actions.items %}
                <li class="govuk-summary-list__actions-list-item">
                  {{ _actionLink(action) | indent(18) | trim }}
                </li>
              {% endfor %}
            </ul>
          {% endif %}
        </dd>
      {% endif %}
    </div>
  {% endfor %}
</dl>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
govuk_publishing_components-16.6.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-16.5.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-16.4.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-16.3.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-16.2.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-16.1.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-16.0.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-15.3.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-15.2.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-15.1.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-15.0.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-14.0.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-13.8.1 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-13.8.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-13.7.0 node_modules/govuk-frontend/components/summary-list/template.njk
govuk_publishing_components-13.6.1 node_modules/govuk-frontend/components/summary-list/template.njk