From d6efdb607a1a449f8831e872c795dc8e2eae14e3 Mon Sep 17 00:00:00 2001 From: rasmus Date: Sat, 31 May 2025 02:37:10 +0300 Subject: [PATCH] public: quick refactor --- inventory-app/templates/inventory_public.html | 7 ++-- .../templates/inventory_view_public.html | 38 +++++++------------ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/inventory-app/templates/inventory_public.html b/inventory-app/templates/inventory_public.html index 1ca5bea..d39122b 100644 --- a/inventory-app/templates/inventory_public.html +++ b/inventory-app/templates/inventory_public.html @@ -2,15 +2,15 @@ {% block content %}
-
Please log in to see more details
{% include "inventory_filter.html" %} + +

Log in to see more items

- @@ -24,10 +24,11 @@ - {% endfor %}
Slug Name TypeIn use
{{ item | format_name }} {{ item.comment }} {{ item.type }}{% if item.inventory.user %}check_circle{% endif %}
+ +

Log in to see more items

{% endblock %} diff --git a/inventory-app/templates/inventory_view_public.html b/inventory-app/templates/inventory_view_public.html index 6258aac..d405e61 100644 --- a/inventory-app/templates/inventory_view_public.html +++ b/inventory-app/templates/inventory_view_public.html @@ -1,8 +1,9 @@ {% extends 'base.html' %} {% block content %}
-
Please log in to see more details
-

Inventory item.

+{% if item.get("shortener").slug %}/{{ item.get("shortener").slug }}{% else %}k6{% endif %}: {{ item.name }} + +

Log in to see more details

@@ -12,12 +13,17 @@ - - - + + - @@ -32,30 +38,14 @@ - - - - - - - - - - -
Type{{ item["type"] }}Sticker + {% if item.get("shortener").slug %} + {{ item.get("shortener", {}).get("slug") | qr_code }} + + k6.ee/{{ item.get("shortener").slug }} + + {% endif %} +
Vendor {{ item.get("hardware").vendor }}Name {{ item.name }}
Sticker - {% if item.get("shortener").slug %} - - k6.ee/{{ item.get("shortener").slug }} - - {% endif %} -
In use{% if item.inventory.user %}check_circle{% endif %}
+

Log in to see more details

+

Photo

{% if item.has_photo %} {% endif %} {% endblock %} -