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={}) %} -
+
{% if icon_html %} diff --git a/templates/inventory_index.html b/templates/inventory_index.html index f9eca2a..a5a494e 100644 --- a/templates/inventory_index.html +++ b/templates/inventory_index.html @@ -16,25 +16,8 @@ title=title
-
- - - - Search -
-
- - - - - List - -
+ {{ 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
-
- - - - - By User - -
-
- - - - By Location -
-
- - - - - By Type -
+ {{ 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 %}