Files
notifications-admin/app/templates/components/pill.html
T

28 lines
756 B
HTML
Raw Normal View History

2016-06-08 15:15:59 +01:00
{% from 'components/big-number.html' import big_number %}
{% macro pill(
items=[],
2017-01-25 15:59:06 +00:00
current_value=None,
big_number_args={'smaller': True}
) %}
2017-02-14 14:21:36 +00:00
<ul role='tablist' class='pill'>
2016-06-08 15:15:59 +01:00
{% for label, option, link, count in items %}
{% if current_value == option %}
2017-02-14 14:21:36 +00:00
<li aria-selected='true' role='tab'>
2017-02-14 15:09:54 +00:00
<div class='pill-selected-item' tabindex='0'>
{% else %}
2017-02-14 14:21:36 +00:00
<li aria-selected='false' role='tab'>
<a href="{{ link }}">
2016-06-08 15:15:59 +01:00
{% endif %}
2017-02-14 15:09:54 +00:00
{{ big_number(count, **big_number_args) }}
<div class="pill-label">{{ label }}</div>
2016-06-08 15:15:59 +01:00
{% if current_value == option %}
2017-02-14 15:09:54 +00:00
</div>
2016-06-08 15:15:59 +01:00
{% else %}
2017-02-14 14:21:36 +00:00
</a>
{% endif %}
2017-02-14 14:21:36 +00:00
</li>
{% endfor %}
2017-02-14 14:21:36 +00:00
</ul>
2016-06-08 15:15:59 +01:00
{% endmacro %}