mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Put counts into the notification filters
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.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{% from 'components/big-number.html' import big_number %}
|
||||
|
||||
{% macro pill(
|
||||
title,
|
||||
items=[],
|
||||
@@ -5,12 +7,19 @@
|
||||
) %}
|
||||
<nav role='navigation' class='pill' aria-labelledby="pill_{{title}}">
|
||||
<h2 id="pill_{{title}}" class="visuallyhidden">{{title}}</h2>
|
||||
{% for label, option, link in items %}
|
||||
{% for label, option, link, count in items %}
|
||||
{% if current_value == option %}
|
||||
<span aria-hidden="true">{{ label }}</span>
|
||||
<span aria-hidden="true">
|
||||
{% else %}
|
||||
<a href="{{ link }}">{{ label }}</a>
|
||||
<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 %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user