From 5ddc27a73b30f0cb6283a44624f3e067e6529cc5 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Tue, 16 Apr 2024 21:35:58 +0200 Subject: [PATCH] Working on rewrite of web part --- templates/base.html | 18 +- templates/create.html | 41 ++++ templates/index.html | 488 ++++++++++++++++++++++++++++++++++++++++-- templates/table.html | 237 ++++++++++++++++++++ 4 files changed, 756 insertions(+), 28 deletions(-) create mode 100644 templates/create.html create mode 100644 templates/table.html diff --git a/templates/base.html b/templates/base.html index bcf882b..842bf0c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,19 +5,7 @@ {{ title }} - - - - - - - - - - + + + +
+ + +
+ + + + + + + +
+
+ + + +
+ + + +
+
+ + {% for i in set_list %} +
+
+
+
+

+ {{ i[0] }} {{ i[1] }} + {{ i[8] }} +

+
+
+
+ Parts: + {{ i[4] }} +
+
+
+
+
+
+ + Image + +
+
+ +
+
+ +
+ +
+ +
+ +
+
+
+ +
+
+ + {% endfor %} +
+ + + diff --git a/templates/table.html b/templates/table.html new file mode 100644 index 0000000..e67d67d --- /dev/null +++ b/templates/table.html @@ -0,0 +1,237 @@ +{% extends "base.html" %} + +{% block content %} +
+ + +{{ inventory_list[0][5] }} + + +
+ + + + + + + + + + + + {% for brick in inventory_list %} + + + + + + + + {% endfor %} + +
NameColorQtyMissing
{{ brick[3] }}{{ brick[7] }}{{ brick[8] }} +
+ {% set ns = namespace(count='') %} +
+ + + + + + + + +
+ {% for missing in missing_list %} + {% if missing[1] == brick[1] and missing[2] == brick[2] and missing[3] == brick[6] and missing[5] == brick[10] %} + {% set ns.count = missing[4] %} + {% endif %} + {% endfor %} + + +
+
+
+
+
+ + + + + {% endblock %} + + + +{% block scripts %} + + + + +{% endblock %} +