From 6fcb872f0f297f2624812de1f1e1ca786e8f433c Mon Sep 17 00:00:00 2001 From: Jamie Murphy Date: Fri, 31 May 2024 17:22:58 +0100 Subject: [PATCH 1/4] allow plugins to extend objectchangeview with panels --- netbox/templates/extras/objectchange.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index 368a7182147..fd0022ce105 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -1,5 +1,6 @@ {% extends 'generic/object.html' %} {% load helpers %} +{% load plugins %} {% load i18n %} {% block title %}{{ object }}{% endblock %} @@ -144,6 +145,14 @@
{% trans "Post-Change Data" %}
+
+
+ {% plugin_left_page object %} +
+
+ {% plugin_right_page object %} +
+
{% include 'inc/panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %} @@ -158,4 +167,9 @@
{% trans "Post-Change Data" %}
{% endif %}
+
+
+ {% plugin_full_width_page object %} +
+
{% endblock %} From 028b49bb33f2b507fba079ae5c9af5dce14dfe98 Mon Sep 17 00:00:00 2001 From: Jamie Murphy Date: Fri, 31 May 2024 17:26:53 +0100 Subject: [PATCH 2/4] replace tabs with spaces --- netbox/templates/extras/objectchange.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index fd0022ce105..a914b1ca326 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -146,12 +146,12 @@
{% trans "Post-Change Data" %}
-
+
{% plugin_left_page object %}
-
+
{% plugin_right_page object %} -
+ /div>
From 7879253a320007b7b4204c3966cf6625492ae787 Mon Sep 17 00:00:00 2001 From: "Jamie (Bear) Murphy" <1613241+ITJamie@users.noreply.github.com> Date: Mon, 3 Jun 2024 20:09:13 +0100 Subject: [PATCH 3/4] Update netbox/templates/extras/objectchange.html Co-authored-by: Jeremy Stretch --- netbox/templates/extras/objectchange.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index a914b1ca326..901e73804eb 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -151,7 +151,7 @@
{% trans "Post-Change Data" %}
{% plugin_right_page object %} - /div> +
From f11d3a4515f17ddf910a16dd47710a0697d0adb2 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 4 Jun 2024 08:47:36 -0400 Subject: [PATCH 4/4] Eliminate excessive vertical margin --- netbox/templates/extras/objectchange.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index 901e73804eb..ffd6e77fa11 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -23,7 +23,7 @@ {% block subtitle %}{% endblock %} {% block content %} -
+
{% trans "Change" %}
@@ -105,7 +105,7 @@
-
+
{% trans "Pre-Change Data" %}
@@ -145,7 +145,7 @@
{% trans "Post-Change Data" %}
-
+
{% plugin_left_page object %}
@@ -153,7 +153,7 @@
{% trans "Post-Change Data" %}
{% plugin_right_page object %}
-
+
{% include 'inc/panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %} {% if related_changes_count > related_changes_table.rows|length %}