diff --git a/netbox/templates/circuits/circuit.html b/netbox/templates/circuits/circuit.html index da7332a7c..450e5a46c 100644 --- a/netbox/templates/circuits/circuit.html +++ b/netbox/templates/circuits/circuit.html @@ -123,21 +123,12 @@ {% endif %} - - Tags - - {% for tag in circuit.tags.all %} - {% tag tag 'circuits:circuit_list' %} - {% empty %} - N/A - {% endfor %} - - {% with circuit.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=circuit.tags.all url='circuits:circuit_list' %}
Comments diff --git a/netbox/templates/circuits/circuit_edit.html b/netbox/templates/circuits/circuit_edit.html index 06ad65241..325d68dea 100644 --- a/netbox/templates/circuits/circuit_edit.html +++ b/netbox/templates/circuits/circuit_edit.html @@ -38,18 +38,18 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} {% block javascript %} diff --git a/netbox/templates/circuits/provider.html b/netbox/templates/circuits/provider.html index 1a8258280..d91442728 100644 --- a/netbox/templates/circuits/provider.html +++ b/netbox/templates/circuits/provider.html @@ -115,16 +115,6 @@ {% endif %} - - Tags - - {% for tag in provider.tags.all %} - {% tag tag 'circuits:provider_list' %} - {% empty %} - N/A - {% endfor %} - - Circuits @@ -136,6 +126,7 @@ {% with provider.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=provider.tags.all url='circuits:provider_list' %}
Comments diff --git a/netbox/templates/circuits/provider_edit.html b/netbox/templates/circuits/provider_edit.html index dfa239e40..63b7f11b9 100644 --- a/netbox/templates/circuits/provider_edit.html +++ b/netbox/templates/circuits/provider_edit.html @@ -27,16 +27,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index cf4b76586..ac390256e 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -169,16 +169,6 @@ {% endif %} - - Tags - - {% for tag in device.tags.all %} - {% tag tag 'dcim:device_list' %} - {% empty %} - N/A - {% endfor %} - - {% if vc_members %} @@ -295,6 +285,7 @@ {% with device.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=device.tags.all url='dcim:device_list' %}
Comments diff --git a/netbox/templates/dcim/device_edit.html b/netbox/templates/dcim/device_edit.html index d39c01482..23e023c5c 100644 --- a/netbox/templates/dcim/device_edit.html +++ b/netbox/templates/dcim/device_edit.html @@ -77,16 +77,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/dcim/devicetype.html b/netbox/templates/dcim/devicetype.html index 821f00dea..31004f314 100644 --- a/netbox/templates/dcim/devicetype.html +++ b/netbox/templates/dcim/devicetype.html @@ -85,16 +85,6 @@ Interface Ordering {{ devicetype.get_interface_ordering_display }} - - Tags - - {% for tag in devicetype.tags.all %} - {% tag tag 'dcim:devicetype_list' %} - {% empty %} - N/A - {% endfor %} - - Instances {{ devicetype.instances.count }} @@ -171,6 +161,7 @@ {% with devicetype.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=devicetype.tags.all url='dcim:devicetype_list' %}
Comments diff --git a/netbox/templates/dcim/devicetype_edit.html b/netbox/templates/dcim/devicetype_edit.html index e69077ad9..d0ed2c204 100644 --- a/netbox/templates/dcim/devicetype_edit.html +++ b/netbox/templates/dcim/devicetype_edit.html @@ -31,16 +31,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/dcim/rack.html b/netbox/templates/dcim/rack.html index 024835d6d..48b5e078e 100644 --- a/netbox/templates/dcim/rack.html +++ b/netbox/templates/dcim/rack.html @@ -125,16 +125,6 @@ {% endif %} - - Tags - - {% for tag in rack.tags.all %} - {% tag tag 'dcim:rack_list' %} - {% empty %} - N/A - {% endfor %} - - Devices @@ -171,6 +161,19 @@ {% with rack.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=rack.tags.all url='dcim:rack_list' %} +
+
+ Comments +
+
+ {% if rack.comments %} + {{ rack.comments|gfm }} + {% else %} + None + {% endif %} +
+
Non-Racked Devices @@ -212,18 +215,6 @@
{% endif %}
-
-
- Comments -
-
- {% if rack.comments %} - {{ rack.comments|gfm }} - {% else %} - None - {% endif %} -
-
Images diff --git a/netbox/templates/dcim/rack_edit.html b/netbox/templates/dcim/rack_edit.html index b9526a3ac..d500a1954 100644 --- a/netbox/templates/dcim/rack_edit.html +++ b/netbox/templates/dcim/rack_edit.html @@ -37,16 +37,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index 9979c4d36..d82093f56 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -145,16 +145,6 @@ {% endif %} - - Tags - - {% for tag in site.tags.all %} - {% tag tag 'dcim:site_list' %} - {% empty %} - N/A - {% endfor %} - -
@@ -232,6 +222,7 @@ {% with site.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=site.tags.all url='dcim:site_list' %}
Comments diff --git a/netbox/templates/dcim/site_edit.html b/netbox/templates/dcim/site_edit.html index a8d14aca7..5819b964f 100644 --- a/netbox/templates/dcim/site_edit.html +++ b/netbox/templates/dcim/site_edit.html @@ -42,16 +42,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/extras/inc/tags_panel.html b/netbox/templates/extras/inc/tags_panel.html new file mode 100644 index 000000000..257a1fc22 --- /dev/null +++ b/netbox/templates/extras/inc/tags_panel.html @@ -0,0 +1,13 @@ +{% load helpers %} +
+
+ Tags +
+
+ {% for tag in tags %} + {% tag tag url %} + {% empty %} + No tags assigned + {% endfor %} +
+
diff --git a/netbox/templates/ipam/aggregate.html b/netbox/templates/ipam/aggregate.html index 1e72e0cf6..1c6f29694 100644 --- a/netbox/templates/ipam/aggregate.html +++ b/netbox/templates/ipam/aggregate.html @@ -93,16 +93,6 @@ {% endif %} - - Tags - - {% for tag in aggregate.tags.all %} - {% tag tag 'ipam:aggregate_list' %} - {% empty %} - N/A - {% endfor %} - -
@@ -110,6 +100,7 @@ {% with aggregate.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=aggregate.tags.all url='ipam:aggregate_list' %}
diff --git a/netbox/templates/ipam/ipaddress.html b/netbox/templates/ipam/ipaddress.html index d19783152..e4f41042a 100644 --- a/netbox/templates/ipam/ipaddress.html +++ b/netbox/templates/ipam/ipaddress.html @@ -145,21 +145,12 @@ {% endif %} - - Tags - - {% for tag in ipaddress.tags.all %} - {% tag tag 'ipam:ipaddress_list' %} - {% empty %} - N/A - {% endfor %} - -
{% with ipaddress.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=ipaddress.tags.all url='ipam:ipaddress_list' %}
{% include 'panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %} diff --git a/netbox/templates/ipam/prefix.html b/netbox/templates/ipam/prefix.html index 3813b7b56..43f59dd80 100644 --- a/netbox/templates/ipam/prefix.html +++ b/netbox/templates/ipam/prefix.html @@ -185,16 +185,6 @@ {% endif %} - - Tags - - {% for tag in prefix.tags.all %} - {% tag tag 'ipam:prefix_list' %} - {% empty %} - N/A - {% endfor %} - - Utilization {% utilization_graph prefix.get_utilization %} @@ -204,7 +194,7 @@ {% with prefix.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} -
+ {% include 'extras/inc/tags_panel.html' with tags=prefix.tags.all url='ipam:prefix_list' %}
{% if duplicate_prefix_table.rows %} diff --git a/netbox/templates/ipam/prefix_edit.html b/netbox/templates/ipam/prefix_edit.html index 333cf1229..401a53e38 100644 --- a/netbox/templates/ipam/prefix_edit.html +++ b/netbox/templates/ipam/prefix_edit.html @@ -28,12 +28,6 @@ {% render_field form.tenant %}
-
-
Tags
-
- {% render_field form.tags %} -
-
{% if form.custom_fields %}
Custom Fields
@@ -42,4 +36,10 @@
{% endif %} +
+
Tags
+
+ {% render_field form.tags %} +
+
{% endblock %} diff --git a/netbox/templates/ipam/vlan.html b/netbox/templates/ipam/vlan.html index 8ce695cb2..44c4e318a 100644 --- a/netbox/templates/ipam/vlan.html +++ b/netbox/templates/ipam/vlan.html @@ -137,21 +137,12 @@ {% endif %} - - Tags - - {% for tag in vlan.tags.all %} - {% tag tag 'ipam:vlan_list' %} - {% empty %} - N/A - {% endfor %} - - {% with vlan.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=vlan.tags.all url='ipam:vlan_list' %}
diff --git a/netbox/templates/ipam/vlan_edit.html b/netbox/templates/ipam/vlan_edit.html index 7862d4de9..1c191343d 100644 --- a/netbox/templates/ipam/vlan_edit.html +++ b/netbox/templates/ipam/vlan_edit.html @@ -21,12 +21,6 @@ {% render_field form.tenant %}
-
-
Tags
-
- {% render_field form.tags %} -
-
{% if form.custom_fields %}
Custom Fields
@@ -35,4 +29,10 @@
{% endif %} +
+
Tags
+
+ {% render_field form.tags %} +
+
{% endblock %} diff --git a/netbox/templates/ipam/vrf.html b/netbox/templates/ipam/vrf.html index 4b8f04c43..51414a8f5 100644 --- a/netbox/templates/ipam/vrf.html +++ b/netbox/templates/ipam/vrf.html @@ -89,22 +89,13 @@ N/A {% endif %} - - - Tags - - {% for tag in vrf.tags.all %} - {% tag tag 'ipam:vrf_list' %} - {% empty %} - N/A - {% endfor %} - {% with vrf.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=vrf.tags.all url='ipam:vrf_list' %}
diff --git a/netbox/templates/ipam/vrf_edit.html b/netbox/templates/ipam/vrf_edit.html index 95a89a6ca..a2ff51d9b 100644 --- a/netbox/templates/ipam/vrf_edit.html +++ b/netbox/templates/ipam/vrf_edit.html @@ -18,12 +18,6 @@ {% render_field form.tenant %}
-
-
Tags
-
- {% render_field form.tags %} -
-
{% if form.custom_fields %}
Custom Fields
@@ -32,4 +26,10 @@
{% endif %} +
+
Tags
+
+ {% render_field form.tags %} +
+
{% endblock %} diff --git a/netbox/templates/secrets/secret.html b/netbox/templates/secrets/secret.html index 8c23dea04..05488bba6 100644 --- a/netbox/templates/secrets/secret.html +++ b/netbox/templates/secrets/secret.html @@ -67,18 +67,9 @@ {% endif %} - - Tags - - {% for tag in secret.tags.all %} - {% tag tag 'secrets:secret_list' %} - {% empty %} - N/A - {% endfor %} - - + {% include 'extras/inc/tags_panel.html' with tags=secret.tags.all url='secrets:secret_list' %}
{% if secret|decryptable_by:request.user %} diff --git a/netbox/templates/tenancy/tenant.html b/netbox/templates/tenancy/tenant.html index 3559012b3..c97044742 100644 --- a/netbox/templates/tenancy/tenant.html +++ b/netbox/templates/tenancy/tenant.html @@ -79,21 +79,12 @@ {% endif %} - - Tags - - {% for tag in tenant.tags.all %} - {% tag tag 'tenancy:tenant_list' %} - {% empty %} - N/A - {% endfor %} - -
{% with tenant.get_custom_fields as custom_fields %} {% include 'inc/custom_fields_panel.html' %} {% endwith %} + {% include 'extras/inc/tags_panel.html' with tags=tenant.tags.all url='tenancy:tenant_list' %}
Comments diff --git a/netbox/templates/tenancy/tenant_edit.html b/netbox/templates/tenancy/tenant_edit.html index 9cc0aa53b..31bc73f3e 100644 --- a/netbox/templates/tenancy/tenant_edit.html +++ b/netbox/templates/tenancy/tenant_edit.html @@ -20,16 +20,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/virtualization/cluster.html b/netbox/templates/virtualization/cluster.html index 2fc472877..e09dda127 100644 --- a/netbox/templates/virtualization/cluster.html +++ b/netbox/templates/virtualization/cluster.html @@ -87,16 +87,6 @@ {% endif %} - - Tags - - {% for tag in cluster.tags.all %} - {% tag tag 'virtualization:cluster_list' %} - {% empty %} - N/A - {% endfor %} - - Virtual Machines {{ cluster.virtual_machines.count }} @@ -104,6 +94,7 @@ {% include 'inc/custom_fields_panel.html' with custom_fields=cluster.get_custom_fields %} + {% include 'extras/inc/tags_panel.html' with tags=cluster.tags.all url='virtualization:cluster_list' %}
Comments diff --git a/netbox/templates/virtualization/cluster_edit.html b/netbox/templates/virtualization/cluster_edit.html index 93fe197ec..629c779ec 100644 --- a/netbox/templates/virtualization/cluster_edit.html +++ b/netbox/templates/virtualization/cluster_edit.html @@ -19,16 +19,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %} diff --git a/netbox/templates/virtualization/virtualmachine.html b/netbox/templates/virtualization/virtualmachine.html index 4038c3d7a..6323f31cc 100644 --- a/netbox/templates/virtualization/virtualmachine.html +++ b/netbox/templates/virtualization/virtualmachine.html @@ -135,19 +135,10 @@ {% endif %} - - Tags - - {% for tag in virtualmachine.tags.all %} - {% tag tag 'virtualization:virtualmachine_list' %} - {% empty %} - N/A - {% endfor %} - - {% include 'inc/custom_fields_panel.html' with custom_fields=virtualmachine.get_custom_fields %} + {% include 'extras/inc/tags_panel.html' with tags=virtualmachine.tags.all url='virtualization:virtualmachine_list' %}
Comments diff --git a/netbox/templates/virtualization/virtualmachine_edit.html b/netbox/templates/virtualization/virtualmachine_edit.html index 0fa7e07fb..ad49f752d 100644 --- a/netbox/templates/virtualization/virtualmachine_edit.html +++ b/netbox/templates/virtualization/virtualmachine_edit.html @@ -48,16 +48,16 @@
{% endif %} -
-
Comments
-
- {% render_field form.comments %} -
-
Tags
{% render_field form.tags %}
+
+
Comments
+
+ {% render_field form.comments %} +
+
{% endblock %}