From 83a9c66a4678e6df047157f011d477ae0b678bc0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 21 Feb 2022 13:04:56 +0100 Subject: [PATCH] show documents in list device of trade lot --- .../templates/inventory/device_list.html | 437 ++++++++++-------- 1 file changed, 246 insertions(+), 191 deletions(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index e917a843..ce3350af 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -42,202 +42,223 @@
+ {% if lot and not lot.is_temporary %} + -
+ New Actions + + + + + +
- + -
+ -
+ -
Computers
+
+ +
Computers
@@ -284,8 +305,40 @@
-
+
+
+ {% if lot and not lot.is_temporary %} +
+
Documents
+ + + + + + + + + {% for doc in lot.trade.documents %} + + + + + {% endfor %} + +
FileUploaded on
+ {% if doc.url.to_text() %} + {{ doc.file_name}} + {% else %} + {{ doc.file_name}} + {% endif %} + + {{ doc.created.strftime('%H:%M %d-%m-%Y')}} +
+
+ {% endif %} + + @@ -299,7 +352,9 @@ {% include "inventory/actions.html" %} {% include "inventory/allocate.html" %} {% include "inventory/data_wipe.html" %} -{% include "inventory/trade.html" %} +{% if lot and lot.is_temporary %} + {% include "inventory/trade.html" %} +{% endif %}