2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 11:40:58 +00:00

replace labels with badges

This commit is contained in:
Oliver
2021-10-28 17:41:40 +11:00
parent c4fd9b7177
commit f8ac016d60
19 changed files with 82 additions and 181 deletions

View File

@ -5,7 +5,7 @@ const {{ label }}Codes = {
{% for opt in options %}'{{ opt.key }}': {
key: '{{ opt.key }}',
value: '{{ opt.value }}',{% if opt.color %}
label: 'label-{{ opt.color }}',{% endif %}
label: 'bg-{{ opt.color }}',{% endif %}
},
{% endfor %}
};
@ -32,7 +32,7 @@ function {{ label }}StatusDisplay(key, options={}) {
label = '';
}
var classes = `label ${label}`;
var classes = `badge rounded-pill ${label}`;
if (options.classes) {
classes += ' ' + options.classes;