From ca0b21bef5723aedfffaacd90df32a41e965a1cb Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 12 Aug 2022 11:25:03 -0400 Subject: [PATCH] Closes #9980: Use standard table controls template for device interfaces list --- .../device/inc/interface_table_controls.html | 11 +++++++ netbox/templates/dcim/device/interfaces.html | 29 +------------------ netbox/templates/inc/table_controls_htmx.html | 26 ++++++++--------- 3 files changed, 25 insertions(+), 41 deletions(-) create mode 100644 netbox/templates/dcim/device/inc/interface_table_controls.html diff --git a/netbox/templates/dcim/device/inc/interface_table_controls.html b/netbox/templates/dcim/device/inc/interface_table_controls.html new file mode 100644 index 000000000..14e552439 --- /dev/null +++ b/netbox/templates/dcim/device/inc/interface_table_controls.html @@ -0,0 +1,11 @@ +{% extends 'inc/table_controls_htmx.html' %} + +{% block extra_table_controls %} + + +{% endblock extra_table_controls %} diff --git a/netbox/templates/dcim/device/interfaces.html b/netbox/templates/dcim/device/interfaces.html index 79a9d6b6f..94e38dbf3 100644 --- a/netbox/templates/dcim/device/interfaces.html +++ b/netbox/templates/dcim/device/interfaces.html @@ -4,34 +4,7 @@ {% load static %} {% block content %} -
-
-
- - -
-
-
-
- {% if request.user.is_authenticated %} - - {% endif %} - - -
-
-
+ {% include 'dcim/device/inc/interface_table_controls.html' with table_modal="DeviceInterfaceTable_config" %}
{% csrf_token %} diff --git a/netbox/templates/inc/table_controls_htmx.html b/netbox/templates/inc/table_controls_htmx.html index 099ad537e..6d6926d5d 100644 --- a/netbox/templates/inc/table_controls_htmx.html +++ b/netbox/templates/inc/table_controls_htmx.html @@ -1,22 +1,22 @@ {% load helpers %} -
-
-
+
+
+
- +
+ {% block extra_table_controls %}{% endblock %}
-
+
{% if request.user.is_authenticated and table_modal %} -
- -
+
+ +
{% endif %}
-
\ No newline at end of file +