Fixes #4090: Render URL custom fields as links under object view

This commit is contained in:
Jeremy Stretch 2020-02-05 17:08:39 -05:00
parent 070b41e694
commit 2296cdc222
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -9,13 +9,13 @@
<tr>
<td>{{ field }}</td>
<td>
{% if field.type == 300 and value == True %}
{% if field.type == 'boolean' and value == True %}
<i class="glyphicon glyphicon-ok text-success" title="True"></i>
{% elif field.type == 300 and value == False %}
{% elif field.type == 'boolean' and value == False %}
<i class="glyphicon glyphicon-remove text-danger" title="False"></i>
{% elif field.type == 500 and value %}
{% elif field.type == 'url' and value %}
<a href="{{ value }}">{{ value|truncatechars:70 }}</a>
{% elif field.type == 200 or value %}
{% elif field.type == 'integer' or value %}
{{ value }}
{% elif field.required %}
<span class="text-warning">Not defined</span>