From 52c1e795a1f7fdffecd668012a9bbd46f298a38a Mon Sep 17 00:00:00 2001 From: Bernhard Bock Date: Sat, 22 Sep 2018 11:42:28 +0200 Subject: [PATCH] Hide related elements in print Rationale is that related elements make sense to link together, but are not relevant on printouts. Issue: #2435 Signed-off-by: Bernhard Bock (github: bbock) --- netbox/project-static/css/base.css | 3 +++ netbox/templates/dcim/device.html | 2 +- netbox/templates/extras/objectchange.html | 2 +- netbox/templates/ipam/ipaddress.html | 2 +- netbox/templates/panel_table.html | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index 0481d2390..bb3e6151a 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -462,6 +462,9 @@ textarea { .sub-header { display: none; } + #related { + display: none; + } #panel-search { display: none; } diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 10c3d2a78..a1d45e706 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -415,7 +415,7 @@ {% endif %} -
+
- {% include 'panel_table.html' with table=related_changes_table heading='Related Changes' %} + {% include 'panel_table.html' with table=related_changes_table heading='Related Changes' panel_id='related' %} {% if related_changes_count > related_changes_table.rows|length %}
See all {{ related_changes_count|add:"1" }} changes diff --git a/netbox/templates/ipam/ipaddress.html b/netbox/templates/ipam/ipaddress.html index f6d952e74..772b65319 100644 --- a/netbox/templates/ipam/ipaddress.html +++ b/netbox/templates/ipam/ipaddress.html @@ -156,7 +156,7 @@ {% if duplicate_ips_table.rows %} {% include 'panel_table.html' with table=duplicate_ips_table heading='Duplicate IP Addresses' panel_class='danger' %} {% endif %} - {% include 'panel_table.html' with table=related_ips_table heading='Related IP Addresses' panel_class='default' %} + {% include 'panel_table.html' with table=related_ips_table heading='Related IP Addresses' panel_class='default' panel_id='related' %}
{% endblock %} diff --git a/netbox/templates/panel_table.html b/netbox/templates/panel_table.html index 26e623675..4a5e74050 100644 --- a/netbox/templates/panel_table.html +++ b/netbox/templates/panel_table.html @@ -1,6 +1,6 @@ {% load render_table from django_tables2 %} -
+
{% if heading %}
{{ heading }}