mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-03 01:34:34 +02:00
Allow to define manufacturing status for a part.
This commit is contained in:
parent
b14edfc3bd
commit
d22f9da1f0
5 changed files with 84 additions and 4 deletions
|
@ -52,4 +52,25 @@
|
|||
{% for tag in string|split(',') %}
|
||||
<a href="#" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_status_to_badge(status, class="badge") %}
|
||||
{% if status is not empty %}
|
||||
{% set color = " badge-secondary" %}
|
||||
|
||||
{% if status == "active" %}
|
||||
{% set color = " badge-success" %}
|
||||
{% elseif status == "nrfnd" %}
|
||||
{% set color = " badge-warning" %}
|
||||
{% elseif status == "eol" %}
|
||||
{% set color = " badge-warning" %}
|
||||
{% elseif status == "discontinued" %}
|
||||
{% set color = " badge-danger" %}
|
||||
{% endif %}
|
||||
|
||||
<span class="{{ class ~ color}}" title="{{ ("m_status." ~ status ~ ".help") | trans }}">
|
||||
<i class="fa-fw fas fa-info-circle"></i>
|
||||
{{ ("m_status." ~ status) | trans }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue