Allow plugins to extend objectchange view (#16371)

* allow plugins to extend objectchangeview with panels

* replace tabs with spaces

* Update netbox/templates/extras/objectchange.html

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* Eliminate excessive vertical margin

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Jamie (Bear) Murphy 2024-06-04 13:49:08 +01:00 committed by GitHub
parent 291e0665d0
commit 7be003f5a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}
{% load i18n %}
{% block title %}{{ object }}{% endblock %}
@ -22,7 +23,7 @@
{% block subtitle %}{% endblock %}
{% block content %}
<div class="row mb-3">
<div class="row">
<div class="col col-md-5">
<div class="card">
<h5 class="card-header">{% trans "Change" %}</h5>
@ -104,7 +105,7 @@
</div>
</div>
</div>
<div class="row mb-3">
<div class="row">
<div class="col col-md-6">
<div class="card">
<h5 class="card-header">{% trans "Pre-Change Data" %}</h5>
@ -144,7 +145,15 @@
</div>
</div>
</div>
<div class="row mb-3">
<div class="row">
<div class="col col-md-6">
{% plugin_left_page object %}
</div>
<div class="col col-md-6">
{% plugin_right_page object %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% 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 %}
@ -158,4 +167,9 @@
{% endif %}
</div>
</div>
<div class="row">
<div class="col col-md-12">
{% plugin_full_width_page object %}
</div>
</div>
{% endblock %}