mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Allow filter links to be used in combination
Means you can see, for example emails that have failed. Means adding: - logic to generate links which can have a type parameter, a status parameter, or both - a ‘pill’ UI component for seeing which filters you currently have applied - some logic to change the page title based on which filters you have applied
This commit is contained in:
16
app/templates/components/pill.html
Normal file
16
app/templates/components/pill.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% 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 in items %}
|
||||
{% if current_value == option %}
|
||||
<span aria-hidden="true">{{ label }}</span>
|
||||
{% else %}
|
||||
<a href="{{ link }}">{{ label }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user