From 28ae6849b4fe276e775a0bd745c67be2ebb69ead Mon Sep 17 00:00:00 2001 From: Saria Hajjar Date: Thu, 2 Jan 2020 16:29:11 +0000 Subject: [PATCH] Templatized show_available toggle --- netbox/templates/ipam/aggregate.html | 9 +-------- netbox/templates/ipam/inc/toggle_available.html | 9 +++++++++ netbox/templates/ipam/prefix.html | 9 +-------- 3 files changed, 11 insertions(+), 16 deletions(-) create mode 100644 netbox/templates/ipam/inc/toggle_available.html diff --git a/netbox/templates/ipam/aggregate.html b/netbox/templates/ipam/aggregate.html index ae79e9b66..d2dfe8888 100644 --- a/netbox/templates/ipam/aggregate.html +++ b/netbox/templates/ipam/aggregate.html @@ -40,14 +40,7 @@

{% block title %}{{ aggregate }}{% endblock %}

{% include 'inc/created_updated.html' with obj=aggregate %} - {% if show_available is not None %} -
- -
- {% endif %} + {% include 'ipam/inc/toggle_available.html' %}
{% custom_links aggregate %}
diff --git a/netbox/templates/ipam/inc/toggle_available.html b/netbox/templates/ipam/inc/toggle_available.html new file mode 100644 index 000000000..21d734d2d --- /dev/null +++ b/netbox/templates/ipam/inc/toggle_available.html @@ -0,0 +1,9 @@ +{% load helpers %} +{% if show_available is not None %} +
+ +
+{% endif %} diff --git a/netbox/templates/ipam/prefix.html b/netbox/templates/ipam/prefix.html index 43b723553..56267786f 100644 --- a/netbox/templates/ipam/prefix.html +++ b/netbox/templates/ipam/prefix.html @@ -53,14 +53,7 @@

{% block title %}{{ prefix }}{% endblock %}

{% include 'inc/created_updated.html' with obj=prefix %} - {% if show_available is not None %} -
- -
- {% endif %} + {% include 'ipam/inc/toggle_available.html' %}
{% custom_links prefix %}