FIX: Update table row colouration for production statuses

TODO: Make the colour defined by the status as opposed to hardcoding it...
This commit is contained in:
2019-12-04 21:11:33 +00:00
parent c249cf7c60
commit 4bf399090b

View File

@@ -3,12 +3,14 @@
<!---TODO: When the ability to filter the list is added, remove the colours from the filter - specifically, stop greying out sold/binned stuff if it is being searched for--> <tr class="
{% if item.status.name == 'Broken' %}
danger
{% elif item.status.name == 'Scrapped'%}
danger
{% elif item.status.name == 'Lost'%}
warning
{% elif item.status.name == 'In Service'%}
{% elif item.status.name == 'Not Built Yet'%}
warning
{% elif item.status.name == 'Active'%}
success
{% elif item.status.name == 'Sold'%}
info
{% endif %}
">
<td style="vertical-align: middle;"><a href="{% url 'asset_detail' item.asset_id %}">{{ item.asset_id }}</a></td>