mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Display templated parts as italic in the part list
This commit is contained in:
parent
6603d6e9ed
commit
21dd893c01
@ -93,6 +93,7 @@ class EditPartForm(HelperForm):
|
||||
'name',
|
||||
'IPN',
|
||||
'variant',
|
||||
'is_template',
|
||||
'description',
|
||||
'keywords',
|
||||
'URL',
|
||||
|
@ -85,6 +85,8 @@ class PartSerializer(serializers.ModelSerializer):
|
||||
'full_name',
|
||||
'name',
|
||||
'IPN',
|
||||
'is_template',
|
||||
'variant_of',
|
||||
'variant',
|
||||
'description',
|
||||
'keywords',
|
||||
|
@ -47,10 +47,12 @@
|
||||
<button type='button' class='btn btn-default btn-glyph' id='toggle-starred' title='Star this part'>
|
||||
<span id='part-star-icon' class='starred-part glyphicon {% if starred %}glyphicon-star{% else %}glyphicon-star-empty{% endif %}'/>
|
||||
</button>
|
||||
{% if part.is_template == False %}
|
||||
{% include "qr_button.html" %}
|
||||
<button type='button' class='btn btn-default btn-glyph' id='price-button' title='Show pricing information'>
|
||||
<span id='part-price-icon' class='part-price glyphicon glyphicon-usd'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</p>
|
||||
<table class='table table-condensed'>
|
||||
|
@ -124,7 +124,12 @@ function loadPartTable(table, url, options={}) {
|
||||
sortable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
|
||||
if (row.is_template) {
|
||||
value = '<i>' + value + '</i>';
|
||||
}
|
||||
|
||||
var display = imageHoverIcon(row.image_url) + renderLink(value, row.url);
|
||||
|
||||
if (!row.active) {
|
||||
display = display + "<span class='label label-warning' style='float: right;'>INACTIVE</span>";
|
||||
}
|
||||
@ -135,6 +140,14 @@ function loadPartTable(table, url, options={}) {
|
||||
sortable: true,
|
||||
field: 'description',
|
||||
title: 'Description',
|
||||
formatter: function(value, row, index, field) {
|
||||
|
||||
if (row.is_template) {
|
||||
value = '<i>' + value + '</i>';
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
|
Loading…
Reference in New Issue
Block a user