diff --git a/netbox/dcim/tables/template_code.py b/netbox/dcim/tables/template_code.py index 131506d7f..e0f38afef 100644 --- a/netbox/dcim/tables/template_code.py +++ b/netbox/dcim/tables/template_code.py @@ -1,5 +1,3 @@ -from django.utils.translation import gettext_lazy as _ - LINKTERMINATION = """ {% for termination in value %} {% if termination.parent_object %} @@ -22,11 +20,11 @@ WEIGHT = """ {% if value %}{{ value|floatformat:"-2" }} {{ record.weight_unit }}{% endif %} """ -DEVICE_LINK = _(""" +DEVICE_LINK = """ {{ value|default:'Unnamed device' }} -""") +""" -DEVICEBAY_STATUS = _(""" +DEVICEBAY_STATUS = """ {% if record.installed_device_id %} {{ record.installed_device.get_status_display }} @@ -34,7 +32,7 @@ DEVICEBAY_STATUS = _(""" {% else %} Vacant {% endif %} -""") +""" INTERFACE_IPADDRESSES = """
@@ -56,7 +54,7 @@ INTERFACE_FHRPGROUPS = """
""" -INTERFACE_TAGGED_VLANS = _(""" +INTERFACE_TAGGED_VLANS = """ {% if record.mode == 'tagged' %} {% for vlan in value.all %} {{ vlan }}
@@ -64,7 +62,7 @@ INTERFACE_TAGGED_VLANS = _(""" {% elif record.mode == 'tagged-all' %} All {% endif %} -""") +""" INTERFACE_WIRELESS_LANS = """ {% for wlan in value.all %} @@ -108,7 +106,7 @@ MODULAR_COMPONENT_TEMPLATE_BUTTONS = """ # Device component buttons # -CONSOLEPORT_BUTTONS = _(""" +CONSOLEPORT_BUTTONS = """ {% if perms.dcim.add_inventoryitem %} @@ -156,9 +154,9 @@ CONSOLEPORT_BUTTONS = _(""" {% else %} {% endif %} -""") +""" -CONSOLESERVERPORT_BUTTONS = _(""" +CONSOLESERVERPORT_BUTTONS = """ {% if perms.dcim.add_inventoryitem %} @@ -206,9 +204,9 @@ CONSOLESERVERPORT_BUTTONS = _(""" {% else %} {% endif %} -""") +""" -POWERPORT_BUTTONS = _(""" +POWERPORT_BUTTONS = """ {% if perms.dcim.add_inventoryitem %} @@ -255,9 +253,9 @@ POWERPORT_BUTTONS = _(""" {% else %} {% endif %} -""") +""" -POWEROUTLET_BUTTONS = _(""" +POWEROUTLET_BUTTONS = """ {% if perms.dcim.add_inventoryitem %} @@ -300,9 +298,9 @@ POWEROUTLET_BUTTONS = _(""" {% endif %} {% endif %} -""") +""" -INTERFACE_BUTTONS = _(""" +INTERFACE_BUTTONS = """ {% if perms.dcim.change_interface %}