mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #264 from SchrodingersGat/build-image-fix
Improved part thumbnails in build allocation
This commit is contained in:
commit
82eceac604
@ -4,20 +4,14 @@
|
|||||||
{% load inventree_extras %}
|
{% load inventree_extras %}
|
||||||
|
|
||||||
{% block collapse_title %}
|
{% block collapse_title %}
|
||||||
<div>
|
<div class='hover-icon media-left' style='float: left;'>
|
||||||
<div class='media-left'>
|
<img class='hover-img-thumb' src="{% if item.sub_part.image %}{{ item.sub_part.image.url }}{% endif %}">
|
||||||
<img class='part-thumb' style='height: auto; width: 48px;'
|
<img class='hover-img-large' src="{% if item.sub_part.image %}{{ item.sub_part.image.url }}{% endif %}">
|
||||||
{% if item.sub_part.image %}
|
|
||||||
src="{{ item.sub_part.image.url }}" alt='{{ item.sub_part.name }}'>
|
|
||||||
{% else %}
|
|
||||||
src="{% static 'img/blank_image.png' %}" alt='No image'>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class='media-body'>
|
<div>
|
||||||
{{ item.sub_part.name }}<br>
|
{{ item.sub_part.name }}<br>
|
||||||
<small><i>{{ item.sub_part.description }}</i></small>
|
<small><i>{{ item.sub_part.description }}</i></small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block collapse_heading %}
|
{% block collapse_heading %}
|
||||||
|
@ -366,7 +366,7 @@ function loadStockTable(table, options) {
|
|||||||
title: 'Part',
|
title: 'Part',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return imageHoverIcon(row.part.image_url) + renderLink(value, row.part.url);
|
return imageHoverIcon(row.part.image_url) + renderLink(value, row.part.url + 'stock/');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user