mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-03 16:09:36 +00:00
Migrated badges to BS5.
This commit is contained in:
parent
6885aefbe7
commit
270d622265
9 changed files with 36 additions and 36 deletions
|
|
@ -25,7 +25,7 @@
|
|||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro string_to_tags(string, class="badge badge-info") %}
|
||||
{% macro string_to_tags(string, class="badge bg-info") %}
|
||||
{% for tag in string|split(',') %}
|
||||
<a href="{{ url('part_list_tags', {'tag': tag | trim}) }}" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
{% endfor %}
|
||||
|
|
@ -33,16 +33,16 @@
|
|||
|
||||
{% macro m_status_to_badge(status, class="badge") %}
|
||||
{% if status is not empty %}
|
||||
{% set color = " badge-secondary" %}
|
||||
{% set color = " bg-secondary" %}
|
||||
|
||||
{% if status == "active" %}
|
||||
{% set color = " badge-success" %}
|
||||
{% set color = " bg-success" %}
|
||||
{% elseif status == "nrfnd" %}
|
||||
{% set color = " badge-warning" %}
|
||||
{% set color = " bg-warning" %}
|
||||
{% elseif status == "eol" %}
|
||||
{% set color = " badge-warning" %}
|
||||
{% set color = " bg-warning" %}
|
||||
{% elseif status == "discontinued" %}
|
||||
{% set color = " badge-danger" %}
|
||||
{% set color = " bg-danger" %}
|
||||
{% endif %}
|
||||
|
||||
<span class="{{ class ~ color}}" title="{{ ("m_status." ~ status ~ ".help") | trans }}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue