29 lines
920 B
HTML
29 lines
920 B
HTML
{% from "components/icon.html" import Icon %}
|
|
|
|
{% macro Label(type=None, classes="") -%}
|
|
{% set label_info = {
|
|
"invite_pending": {"icon": "envelope", "text": "invite pending", "color": "success",},
|
|
"invite_expired": {"icon": "envelope", "text": "invite expired", "color": "error",},
|
|
"changes_pending": {
|
|
"icon": "exchange",
|
|
"text": "changes pending",
|
|
"color": "default",
|
|
},
|
|
"pending_creation": {
|
|
"icon": "clock",
|
|
"text": "pending creation",
|
|
"color": "default",
|
|
},
|
|
"ppoc": {"text": "primary point of contact"}
|
|
} %}
|
|
|
|
{% if type in label_info.keys() -%}
|
|
<span class='label label--{{ label_info[type]["color"] }} {{ classes }}'>
|
|
{% if label_info[type]["icon"] %}
|
|
{{ Icon(label_info[type]["icon"]) }}
|
|
{% endif %}
|
|
{{ label_info[type]["text"] }}
|
|
</span>
|
|
{%- endif %}
|
|
{%- endmacro %}
|