Files
notifications-admin/app/templates/components/pill.html
Chris Hill-Scott e7e0b2f227 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.
2016-06-14 11:00:56 +01:00

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 %}