-
- Box: {{ box.id }} ({{ box.box_type.name }})
-
-
- {% if formset.non_form_errors %}
-
- {% for form_errors in formset.non_form_errors %}
- {% for field, errors in form_errors.items %}
- {% for error in errors %}
-
{{ error }}
- {% endfor %}
+ {% if formset.non_form_errors %}
+
+
+ {% for form_errors in formset.non_form_errors %}
+ {% for field, errors in form_errors.items %}
+ {% for error in errors %}
+ {{ error }}
{% endfor %}
{% endfor %}
-
- {% endif %}
-
- {% if formset.total_form_count %}
-
+ {% endif %}
+
+{% endblock %}
+
+{% block extra_js %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/boxes/templates/boxes/box_detail.html b/boxes/templates/boxes/box_detail.html
index 5a1fde7..9f53664 100644
--- a/boxes/templates/boxes/box_detail.html
+++ b/boxes/templates/boxes/box_detail.html
@@ -1,122 +1,90 @@
+{% extends "base.html" %}
{% load thumbnail %}
-
-
-
-
-
-
Box {{ box.id }} - LabHelper
-
-
-
-
← Back to Home
-
-
Box {{ box.id }}
-
-
-
Type: {{ box.box_type.name }}
- ({{ box.box_type.width }} x {{ box.box_type.height }} x {{ box.box_type.length }} mm)
-
-
+ Add Things
+
+{% block title %}Box {{ box.id }} - LabHelper{% endblock %}
+
+{% block page_header %}
+
+{% endblock %}
+
+{% block content %}
+
+
+
+
+ Type: {{ box.box_type.name }}
+
+
+ {{ box.box_type.width }} x {{ box.box_type.height }} x {{ box.box_type.length }} mm
+
+
+
+ Add Things
+
-
- {% if things %}
-
-
-
- | Picture |
- Name |
- Type |
- Description |
-
-
-
- {% for thing in things %}
-
-
- {% if thing.picture %}
- {% thumbnail thing.picture "50x50" crop="center" as thumb %}
-
- {% endthumbnail %}
- {% else %}
- No image
- {% endif %}
- |
- {{ thing.name }} |
- {{ thing.thing_type.name }} |
- {{ thing.description|default:"-" }} |
-
- {% endfor %}
-
-
- {% else %}
-
- This box is empty.
+
+
+{% if things %}
+
+
+
+
+
+ | Picture |
+ Name |
+ Type |
+ Description |
+
+
+
+ {% for thing in things %}
+
+
+ {% if thing.picture %}
+ {% thumbnail thing.picture "50x50" crop="center" as thumb %}
+
+ {% endthumbnail %}
+ {% else %}
+ No image
+ {% endif %}
+ |
+
+ {{ thing.name }}
+ |
+ {{ thing.thing_type.name }} |
+ {{ thing.description|default:"-" }} |
+
+ {% endfor %}
+
+
- {% endif %}
-
-
+
+{% else %}
+
+
+
This box is empty
+
Add some items to get started!
+
+ Add Things
+
+
+{% endif %}
+{% endblock %}
+
+{% block extra_js %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/boxes/templates/boxes/index.html b/boxes/templates/boxes/index.html
index 5fc532c..664a3ce 100644
--- a/boxes/templates/boxes/index.html
+++ b/boxes/templates/boxes/index.html
@@ -1,205 +1,103 @@
+{% extends "base.html" %}
{% load mptt_tags %}
-
-
-
-
-
-
LabHelper
-
-
-
-
-
-
-
LabHelper
-
-
-
-
-
Boxes
- {% if boxes %}
-
- {% for box in boxes %}
-
+
+
+
Thing Types
+ {% if thing_types %}
+
+ {% recursetree thing_types %}
+ -
+
+ {% if children %}
+
[-]
+ {% else %}
+
+ {% endif %}
+
{{ node.name }}
+ {% if node.things.exists %}
+
{{ node.things.count }}
+ {% endif %}
+
+ {% if children %}
+
+ {% endif %}
+
+ {% endrecursetree %}
+
+ {% else %}
+
+
+ No thing types found.
+
+ {% endif %}
+
+{% endblock %}
+
+{% block extra_js %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/boxes/templates/boxes/search.html b/boxes/templates/boxes/search.html
index 15eef14..16e4389 100644
--- a/boxes/templates/boxes/search.html
+++ b/boxes/templates/boxes/search.html
@@ -1,187 +1,125 @@
-
-
-
-
-
-
Search - LabHelper
-
-
-
-
← Back to Home
+{% extends "base.html" %}
+
+{% block title %}Search - LabHelper{% endblock %}
+
+{% block page_header %}
+
+{% endblock %}
+
+{% block content %}
+
+
+
+ Type at least 2 characters to search
+
+
-
Search Things
-
-
-
-
Type at least 2 characters to search
-
-
-
-
+
+
+
-
- | Name |
- Type |
- Box |
- Description |
+
+ | Name |
+ Type |
+ Box |
+ Description |
+
-
- No results found.
-
+
+
+
No results found
+
Try different keywords or browse the full inventory.
+
+{% endblock %}
-
-
-
+ row.addEventListener('mouseleave', function() {
+ this.style.background = 'white';
+ });
+
+ resultsBody.appendChild(row);
+ });
+ });
+ }, 200);
+});
+
+searchInput.addEventListener('blur', function() {
+ searchInput.style.borderColor = '#e0e0e0';
+ searchInput.style.boxShadow = 'none';
+});
+
+function escapeHtml(text) {
+ const div = document.createElement('div');
+ div.textContent = text;
+ return div.innerHTML;
+}
+
+searchInput.focus();
+
+{% endblock %}
\ No newline at end of file
diff --git a/boxes/templates/boxes/thing_detail.html b/boxes/templates/boxes/thing_detail.html
index a8c7825..20fdfd3 100644
--- a/boxes/templates/boxes/thing_detail.html
+++ b/boxes/templates/boxes/thing_detail.html
@@ -1,185 +1,103 @@
+{% extends "base.html" %}
{% load thumbnail %}
-
-
-
-
-
- {{ thing.name }} - LabHelper
-
-
-
-
-
- {{ thing.name }}
-
-
-
+
+{% block title %}{{ thing.name }} - LabHelper{% endblock %}
+
+{% block page_header %}
+
+{% endblock %}
+
+{% block content %}
+
+
+
{% if thing.picture %}
- {% thumbnail thing.picture "300x300" crop="center" as thumb %}
-

+ {% thumbnail thing.picture "400x400" crop="center" as thumb %}
+

{% endthumbnail %}
{% else %}
-
No image
+
{% endif %}
-
-
-
Type
-
{{ thing.thing_type.name }}
+
+
+
+ Type
+
+
+ {{ thing.thing_type.name }}
+
-
-
Location
-
-
Box {{ thing.box.id }}
- ({{ thing.box.box_type.name }})
+
{% if thing.description %}
-
-
Description
-
{{ thing.description }}
+
+
+ Description
+
+
+ {{ thing.description }}
+
{% endif %}
-
-
-
-
-
+
+
+
+
+{% endblock %}
+
+{% block extra_js %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/boxes/templates/boxes/thing_type_detail.html b/boxes/templates/boxes/thing_type_detail.html
index 7652710..3f2bcb7 100644
--- a/boxes/templates/boxes/thing_type_detail.html
+++ b/boxes/templates/boxes/thing_type_detail.html
@@ -1,183 +1,106 @@
+{% extends "base.html" %}
{% load thumbnail %}
-
-
-
-
-
-
{{ thing_type.name }} - LabHelper
-
-
-
-
← Home
-
-
{{ thing_type.name }}
-
-