Files
notifications-admin/app/templates/components/pill.html
Katie Smith 82318387de Add hidden text for pills on job page
The links in the blue boxes on the job page needed hidden text so that
they work out of context. This changes the text from "10 sending" to "10
sending text messages" (with the message type hidden text).
2021-02-24 14:36:21 +00:00

28 lines
1010 B
HTML

{% from 'components/big-number.html' import big_number %}
{% macro pill(
items=[],
current_value=None,
big_number_args={'smaller': True},
show_count=True
) %}
<nav aria-labelledby='page-header'>
<ul class='pill'>
{% for label, option, link, count in items %}
<li class="pill-item__container">
{% if current_value == option %}
<a id="pill-selected-item" class="pill-item pill-item--selected govuk-link govuk-link--no-visited-state{% if not show_count %} pill-item--centered{% endif %}" href="{{ link }}" aria-current="page">
{% else %}
<a class="pill-item govuk-link govuk-link--no-visited-state" href="{{ link }}">
{% endif %}
{% if show_count %}
{{ big_number(count, **big_number_args) }}
{% endif %}
<div class="pill-item__label{% if not show_count %} pill-item--centered{% endif %}">{{ label | safe }}</div>
</a>
</li>
{% endfor %}
</ul>
</nav>
{% endmacro %}