From d9717474042c1d286eb46bfb3f825b787113c42e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 8 May 2019 23:03:28 +1000 Subject: [PATCH] Improved part thumbnails in build allocation --- .../build/templates/build/allocation_item.html | 14 ++++---------- InvenTree/static/script/inventree/stock.js | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/InvenTree/build/templates/build/allocation_item.html b/InvenTree/build/templates/build/allocation_item.html index 3468d6d794..52f7b4ef1a 100644 --- a/InvenTree/build/templates/build/allocation_item.html +++ b/InvenTree/build/templates/build/allocation_item.html @@ -4,20 +4,14 @@ {% load inventree_extras %} {% block collapse_title %} -
-
- {{ item.sub_part.name }} - {% else %} - src="{% static 'img/blank_image.png' %}" alt='No image'> - {% endif %} +
+ +
-
+
{{ item.sub_part.name }}
{{ item.sub_part.description }}
-
{% endblock %} {% block collapse_heading %} diff --git a/InvenTree/static/script/inventree/stock.js b/InvenTree/static/script/inventree/stock.js index 2f55456cdb..3241550ec7 100644 --- a/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/static/script/inventree/stock.js @@ -366,7 +366,7 @@ function loadStockTable(table, options) { title: 'Part', sortable: true, 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/'); } }, {