mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-09 21:04:14 -05:00
We can filter notifications on the activity page by state. This commit adds counts to those filters. This is mainly so that we can consistently do the same thing on the job page later on.
26 lines
691 B
HTML
26 lines
691 B
HTML
{% from 'components/big-number.html' import big_number %}
|
|
|
|
{% macro pill(
|
|
title,
|
|
items=[],
|
|
current_value=None
|
|
) %}
|
|
<nav role='navigation' class='pill' aria-labelledby="pill_{{title}}">
|
|
<h2 id="pill_{{title}}" class="visuallyhidden">{{title}}</h2>
|
|
{% for label, option, link, count in items %}
|
|
{% if current_value == option %}
|
|
<span aria-hidden="true">
|
|
{% else %}
|
|
<a href="{{ link }}">
|
|
{% endif %}
|
|
{{ big_number(count, smaller=True) }}
|
|
<div class="pill-label">{{ label }}</div>
|
|
{% if current_value == option %}
|
|
</span>
|
|
{% else %}
|
|
</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</nav>
|
|
{% endmacro %}
|