From 2296cdc2224e461b1c703307e232144a2ad3173a Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 5 Feb 2020 17:08:39 -0500 Subject: [PATCH] Fixes #4090: Render URL custom fields as links under object view --- docs/release-notes/version-2.7.md | 1 + netbox/templates/inc/custom_fields_panel.html | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/version-2.7.md b/docs/release-notes/version-2.7.md index ec3ce67cf..77a1ff364 100644 --- a/docs/release-notes/version-2.7.md +++ b/docs/release-notes/version-2.7.md @@ -3,6 +3,7 @@ ## Bug Fixes * [#4089](https://github.com/netbox-community/netbox/issues/4089) - Selection of power outlet type during bulk update is optional +* [#4090](https://github.com/netbox-community/netbox/issues/4090) - Render URL custom fields as links under object view * [#4091](https://github.com/netbox-community/netbox/issues/4091) - Fix filtering of objects by custom fields using UI search form * [#4099](https://github.com/netbox-community/netbox/issues/4099) - Linkify interfaces on global interfaces list diff --git a/netbox/templates/inc/custom_fields_panel.html b/netbox/templates/inc/custom_fields_panel.html index 52d9c2d6e..84892f726 100644 --- a/netbox/templates/inc/custom_fields_panel.html +++ b/netbox/templates/inc/custom_fields_panel.html @@ -9,13 +9,13 @@ {{ field }} - {% if field.type == 300 and value == True %} + {% if field.type == 'boolean' and value == True %} - {% elif field.type == 300 and value == False %} + {% elif field.type == 'boolean' and value == False %} - {% elif field.type == 500 and value %} + {% elif field.type == 'url' and value %} {{ value|truncatechars:70 }} - {% elif field.type == 200 or value %} + {% elif field.type == 'integer' or value %} {{ value }} {% elif field.required %} Not defined