From 29b94c91f386916931a3ec983b87e89a7ecb5c16 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 7 May 2019 23:28:46 +1000 Subject: [PATCH] Display part images in build allocation list (CSS needs some work) --- .../build/templates/build/allocation_item.html | 17 +++++++++++++++-- InvenTree/static/css/inventree.css | 8 ++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/InvenTree/build/templates/build/allocation_item.html b/InvenTree/build/templates/build/allocation_item.html index 2b8767a32c..3468d6d794 100644 --- a/InvenTree/build/templates/build/allocation_item.html +++ b/InvenTree/build/templates/build/allocation_item.html @@ -1,10 +1,23 @@ {% extends "collapse.html" %} +{% load static %} {% load inventree_extras %} {% block collapse_title %} -{{ item.sub_part.name }}
-{{ item.sub_part.description }} +
+
+ {{ 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/css/inventree.css b/InvenTree/static/css/inventree.css index 78483daac5..924d4b65d7 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -159,6 +159,14 @@ margin-bottom: 5px; } +.panel-group .panel { + border-radius: 8px; +} + +.panel-heading { + padding: 2px 10px; +} + .float-right { float: right; }