From a5feeeee1da87bd346f71a3f86bc3b416f75a258 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 13 Jun 2025 10:33:20 -0500 Subject: [PATCH] Enhance inventory templates with new SVG icons and refactor category links for improved navigation --- templates/fragments/_icon_fragment.html | 34 ++++++++++++++ templates/fragments/_link_fragment.html | 2 +- templates/inventory_index.html | 59 +++---------------------- 3 files changed, 41 insertions(+), 54 deletions(-) diff --git a/templates/fragments/_icon_fragment.html b/templates/fragments/_icon_fragment.html index d72822c..de0afd8 100644 --- a/templates/fragments/_icon_fragment.html +++ b/templates/fragments/_icon_fragment.html @@ -16,6 +16,40 @@ {% endset %} +{% set map %} + + + +{% endset %} + +{% set motherboard %} + + + + +{% endset %} + +{% set search %} + + + +{% endset %} + +{% set table %} + + + +{% endset %} + {% set user %} diff --git a/templates/fragments/_link_fragment.html b/templates/fragments/_link_fragment.html index 5e13ed8..8fe9cc3 100644 --- a/templates/fragments/_link_fragment.html +++ b/templates/fragments/_link_fragment.html @@ -1,5 +1,5 @@ {% macro category_link(endpoint, label, icon_html=None, arguments={}) %} -
+
-
- - - - Search -
-
+ {{ links.category_link(endpoint = 'search', label = 'Search', icon_html = icons.search, arguments={'category': 'inventory'}) }} + {{ links.category_link(endpoint = 'list_inventory', label = "List", icon_html = icons.table) }}
@@ -42,46 +25,16 @@ title=title
- - - + {{ links.category_link(endpoint = 'inventory_index', label = "By User", icon_html = icons.user, arguments = {'category': 'user'}) }} + {{ links.category_link(endpoint = 'inventory_index', label = 'By Location', icon_html = icons.map, arguments = {'category': 'location'}) }} + {{ links.category_link(endpoint = 'inventory_index', label = 'By Type', icon_html = icons.motherboard, arguments = {'category': 'type'}) }}
{% else %}
{% for line in listing %}
{% for id, name in line %} - + {{ links.category_link(endpoint = 'list_inventory', label = name, arguments = {'filter_by': category, 'id': id}) }} {% endfor %}
{% endfor %}