Merge pull request #523 from SchrodingersGat/template-badge

Display template badge in part table
This commit is contained in:
Oliver 2019-09-13 21:04:19 +10:00 committed by GitHub
commit 03a42fa360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,6 +137,10 @@ function loadPartTable(table, url, options={}) {
var display = imageHoverIcon(row.image) + renderLink(name, '/part/' + row.pk + '/');
if (row.is_template) {
display = display + "<span class='label label-info' style='float: right;'>TEMPLATE</span>";
}
if (!row.active) {
display = display + "<span class='label label-warning' style='float: right;'>INACTIVE</span>";
}