feat: Ordner als echten verschachtelten Baum statt Flachliste anzeigen

Neue Baumansicht fuer Ordner & Kategorien im Nextcloud/Bookstack-Stil
mit Klapp-Navigation, Live-Suche und Breadcrumb-Pfad auf der
Ordner-Detailseite. Die bisherige Tabellenansicht bleibt fuer
Bulk-Aktionen als "Listenansicht" erhalten.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 10:00:42 +02:00
co-authored by Claude Sonnet 5
parent e54917a34c
commit 69f3d0af18
9 changed files with 147 additions and 5 deletions
+12
View File
@@ -103,6 +103,18 @@ class DocumentCategory(NetBoxModel):
def get_absolute_url(self):
return reverse("plugins:netbox_documentation:documentcategory", args=[self.pk])
@property
def ancestors(self):
"""Ancestor folders from the root down to (excluding) this one, for breadcrumbs."""
result = []
parent = self.parent
seen = {self.pk}
while parent and parent.pk not in seen:
result.append(parent)
seen.add(parent.pk)
parent = parent.parent
return list(reversed(result))
def clean(self):
super().clean()
from django.core.exceptions import ValidationError