feat: Ordnerstruktur, Medienupload und erweiterten Editor ergänzen
- NetBox-4.6-Verknüpfungsformular korrigieren - hierarchische Dokumentationsordner hinzufügen - breite Editoransicht und Fokusmodus implementieren - sicheren direkten Bild-Upload integrieren - Ordner über Suche und REST-API bereitstellen
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import django_tables2 as tables
|
||||
from netbox.tables import NetBoxTable, columns
|
||||
from .models import Document, DocumentAssignment
|
||||
from .models import Document, DocumentAssignment, DocumentCategory
|
||||
|
||||
|
||||
class DocumentTable(NetBoxTable):
|
||||
@@ -10,7 +10,17 @@ class DocumentTable(NetBoxTable):
|
||||
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = Document
|
||||
fields = ("pk", "title", "summary", "is_published", "assignments", "last_updated", "actions")
|
||||
fields = ("pk", "title", "category", "summary", "is_published", "assignments", "last_updated", "actions")
|
||||
|
||||
|
||||
class DocumentCategoryTable(NetBoxTable):
|
||||
name = tables.Column(linkify=True, verbose_name="Ordner")
|
||||
document_count = tables.Column(accessor="documents.count", verbose_name="Dokumente", orderable=False)
|
||||
actions = columns.ActionsColumn(actions=("edit", "delete"))
|
||||
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = DocumentCategory
|
||||
fields = ("pk", "name", "parent", "description", "document_count", "actions")
|
||||
|
||||
|
||||
class AssignmentTable(NetBoxTable):
|
||||
@@ -21,4 +31,3 @@ class AssignmentTable(NetBoxTable):
|
||||
class Meta(NetBoxTable.Meta):
|
||||
model = DocumentAssignment
|
||||
fields = ("pk", "document", "assigned_object_type", "assigned_object", "note", "actions")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user