From 527f354f4aeaadad95106386dced0952041a0abb Mon Sep 17 00:00:00 2001 From: jessikitty Date: Sat, 3 Oct 2026 00:55:54 +1000 Subject: [PATCH] Add parts labels browse page --- app/templates/admin/labels/index.html | 257 ++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 app/templates/admin/labels/index.html diff --git a/app/templates/admin/labels/index.html b/app/templates/admin/labels/index.html new file mode 100644 index 0000000..f0d5380 --- /dev/null +++ b/app/templates/admin/labels/index.html @@ -0,0 +1,257 @@ +{% extends "base.html" %} + +{% block title %}Parts Labels - Admin{% endblock %} + +{% block content %} +
+
+

Parts Drawer Labels

+

{{ total_labels }} label{{ '' if total_labels == 1 else 's' }} defined

+
+ +
+ +{% if not rebrickable_ready %} +
+ + No Rebrickable API key yet, so part lookup is off. You can still add labels by hand and upload your own images. + Add a key — it's free. +
+{% endif %} + +
+ +
+
+
+ Categories + All +
+
+ {% for root in roots %} + + +   + {{ root.display_code }} {{ root.name }} + + {{ root.label_count() }} + + {% for child in root.children %} + + ↳ {{ child.name }} + {{ child.label_count() }} + + {% endfor %} + {% else %} +
No categories yet.
+ {% endfor %} +
+
+
+ + +
+
+
+
+ {% if active_category %}{% endif %} +
+ + +
+
+ +
+
+
+
+ + {% if rebrickable_ready %} +
+
+ +
+ + +
+
+
+
+ {% endif %} + +
+
+
+
+ + +
+
+ + + {% if active_category %} + Print whole category + {% endif %} +
+
+ +
+ + + + + + + + + + + + + {% for label in labels %} + + + + + + + + + {% else %} + + {% endfor %} + +
ImagePartCategoryDrawer
+ {% if label.get_image() %} + + {% else %} + + {% endif %} + + {{ label.display_title }} + {% if label.part_numbers_text %} +
{{ label.part_numbers_text }}
+ {% endif %} + {% if label.colour_name %} + {{ label.colour_name }} + {% endif %} +
+ {% if label.category %} +   + {{ label.category.full_name }} + {% else %} + Uncategorised + {% endif %} + {{ label.location or '-' }} + + + + + + +
+ No labels here yet. + Add the first one. +
+
+
+
+ + {% if pagination.pages > 1 %} + + {% endif %} +
+
+ + +
+ + +
+{% endblock %} + +{% block extra_js %} + +{% endblock %}