diff --git a/__pycache__/routes.cpython-313.pyc b/__pycache__/routes.cpython-313.pyc
index f113673..c45292b 100644
Binary files a/__pycache__/routes.cpython-313.pyc and b/__pycache__/routes.cpython-313.pyc differ
diff --git a/routes.py b/routes.py
index 95bb6c7..f27d0b9 100644
--- a/routes.py
+++ b/routes.py
@@ -248,7 +248,7 @@ def list_users():
def user(id):
asset_page = request.args.get("asset_page", default=1, type=int)
worklog_page = request.args.get("worklog_page", default=1, type=int)
- users_query = db.session.query(User)
+ users_query = db.session.query(User).order_by(User.first_name, User.last_name)
users = eager_load_user_relationships(users_query).all()
user = next((u for u in users if u.id == id), None)
rooms_query = db.session.query(Room)
@@ -304,3 +304,7 @@ def worklog_entry(id):
item_query = db.session.query(Inventory)
items = eager_load_inventory_relationships(item_query).all()
return render_template("worklog.html", title=f"Work Log #{id}", log=log, users=users, items=items, form_fields=worklog_form_fields)
+
+@main.route("/search")
+def search():
+ return render_template('search.html', title="Database Search")
diff --git a/templates/form.html b/templates/form.html
index 74b7ba4..d84a94f 100644
--- a/templates/form.html
+++ b/templates/form.html
@@ -1,8 +1,6 @@
{% extends "layout.html" %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}
diff --git a/templates/_breadcrumb_fragment.html b/templates/fragments/_breadcrumb_fragment.html
similarity index 100%
rename from templates/_breadcrumb_fragment.html
rename to templates/fragments/_breadcrumb_fragment.html
diff --git a/templates/fragments/_icon_fragment.html b/templates/fragments/_icon_fragment.html
new file mode 100644
index 0000000..d72822c
--- /dev/null
+++ b/templates/fragments/_icon_fragment.html
@@ -0,0 +1,25 @@
+{% set inventory %}
+
+{% endset %}
+
+{% set log %}
+
+{% endset %}
+
+{% set user %}
+
+{% endset %}
\ No newline at end of file
diff --git a/templates/fragments/_link_fragment.html b/templates/fragments/_link_fragment.html
new file mode 100644
index 0000000..5e13ed8
--- /dev/null
+++ b/templates/fragments/_link_fragment.html
@@ -0,0 +1,11 @@
+{% macro category_link(endpoint, label, icon_html=None, arguments={}) %}
+
+{% endmacro %}
diff --git a/templates/_table_fragment.html b/templates/fragments/_table_fragment.html
similarity index 100%
rename from templates/_table_fragment.html
rename to templates/fragments/_table_fragment.html
diff --git a/templates/index.html b/templates/index.html
index 55a0b23..73786c5 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,21 +1,13 @@
{% extends "layout.html" %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}
- Table of Contents
-
-{% endblock %}
+Table of Contents
+
+ {{ links.category_link(endpoint = 'inventory_index', label = 'Inventory', icon_html = icons.inventory) }}
+ {{ links.category_link(endpoint = 'list_users', label = "Users", icon_html = icons.user) }}
+ {{ links.category_link(endpoint = 'list_worklog', label = 'Worklog', icon_html = icons.log) }}
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/inventory.html b/templates/inventory.html
index 97641c7..449dcf1 100644
--- a/templates/inventory.html
+++ b/templates/inventory.html
@@ -1,9 +1,6 @@
{% extends "layout.html" %}
-{% import "_breadcrumb_fragment.html" as breadcrumbs %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}
diff --git a/templates/inventory_index.html b/templates/inventory_index.html
index c6bc8ca..f9eca2a 100644
--- a/templates/inventory_index.html
+++ b/templates/inventory_index.html
@@ -1,9 +1,6 @@
{% extends "layout.html" %}
-{% import "_breadcrumb_fragment.html" as breadcrumbs %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}
diff --git a/templates/layout.html b/templates/layout.html
index b77750c..a60a051 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -1,3 +1,8 @@
+{% import "fragments/_breadcrumb_fragment.html" as breadcrumbs %}
+{% import "fragments/_icon_fragment.html" as icons %}
+{% import "fragments/_link_fragment.html" as links %}
+{% import "fragments/_table_fragment.html" as tables %}
+
diff --git a/templates/search.html b/templates/search.html
new file mode 100644
index 0000000..4beb6d1
--- /dev/null
+++ b/templates/search.html
@@ -0,0 +1,29 @@
+
+{% extends "layout.html" %}
+
+{% block title %}{{ title }}{% endblock %}
+
+{% block content %}
+
+{{ breadcrumbs.breadcrumb_header(
+title=title,
+) }}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/table.html b/templates/table.html
index 4a1ec7c..f545ea0 100644
--- a/templates/table.html
+++ b/templates/table.html
@@ -1,9 +1,6 @@
{% extends "layout.html" %}
-{% import "_breadcrumb_fragment.html" as breadcrumbs %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}
diff --git a/templates/user.html b/templates/user.html
index ce1edcc..4c5c4e6 100644
--- a/templates/user.html
+++ b/templates/user.html
@@ -1,31 +1,32 @@
{% extends "layout.html" %}
-{% import "_breadcrumb_fragment.html" as breadcrumbs %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}
+
{{ breadcrumbs.breadcrumb_header(
title=title,
breadcrumbs=[
{'label': 'Users', 'url': url_for('main.list_users')}
]
) }}
+{% if not user.active %}
+This user is inactive. You will not be able to make any changes to this record.
+{% endif %}
{% if inventory_rows %}
-
+
{{ tables.render_table(inventory_headers, inventory_rows, 'inventory_item', title='Assets') }}
{% endif %}
{% if worklog_rows %}
-
+
{{ tables.render_table(worklog_headers, worklog_rows, 'worklog_entry', title='Work Done') }}
diff --git a/templates/worklog.html b/templates/worklog.html
index 862652a..1fd50a2 100644
--- a/templates/worklog.html
+++ b/templates/worklog.html
@@ -1,9 +1,6 @@
{% extends "layout.html" %}
-{% import "_breadcrumb_fragment.html" as breadcrumbs %}
-{% import "_table_fragment.html" as tables %}
-
{% block title %}{{ title }}{% endblock %}
{% block content %}