From d860336060c2c532e4ca3dc3d51070ff54a8fd19 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 13 Jun 2019 21:44:09 +1000 Subject: [PATCH] Add some pretty buttons to the purchase order detail table --- .../order/purchase_order_detail.html | 24 +++++++++++++++++-- InvenTree/static/css/inventree.css | 8 +++++++ InvenTree/templates/hover_image.html | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index b6751e044d..9f5c7a588e 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -79,20 +79,40 @@ InvenTree | {{ order }} Order Code Reference Quantity + {% if not order.status == OrderStatus.PENDING %} Received + {% endif %} + {% for line in order.lines.all %} - {{ forloop.counter }} + + {{ forloop.counter }} + {% if line.part %} - {{ line.part.part.full_name }} + + {% include "hover_image.html" with image=line.part.part.image hover=True %} + {{ line.part.part.full_name }} + {{ line.part.SKU }} {% else %} Warning: Part has been deleted. {% endif %} {{ line.reference }} {{ line.quantity }} + {% if not order.status == OrderStatus.PENDING %} {{ line.received }} + {% endif %} + +
+ + +
+ {% endfor %} diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css index 3371b8d399..755b41c104 100644 --- a/InvenTree/static/css/inventree.css +++ b/InvenTree/static/css/inventree.css @@ -299,6 +299,14 @@ color: #1A1; } +.btn-edit { + padding: 3px; + padding: 3px; + padding-left: 5px; + padding-right: 5px; + color: #55E; +} + .button-toolbar { padding-left: 0px; } diff --git a/InvenTree/templates/hover_image.html b/InvenTree/templates/hover_image.html index 4ee9f67b2c..556a8db140 100644 --- a/InvenTree/templates/hover_image.html +++ b/InvenTree/templates/hover_image.html @@ -5,7 +5,7 @@ {% endif %} - {% if hover %} + {% if hover and image %} {% endif %}