1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #11483: Apply configured formatting to custom date fields

This commit is contained in:
jeremystretch
2023-01-13 08:23:57 -05:00
parent 24de404fbc
commit d7c37d9dd6
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@
* [#11438](https://github.com/netbox-community/netbox/issues/11438) - Fix deletion of scheduled job using non-default queues
* [#11444](https://github.com/netbox-community/netbox/issues/11444) - Adding/removing a device from a device bay should record a pre-change snapshot on the device bay
* [#11467](https://github.com/netbox-community/netbox/issues/11467) - Correct count on interfaces tab when viewing a VC master device
* [#11483](https://github.com/netbox-community/netbox/issues/11483) - Apply configured formatting to custom date fields
---

View File

@ -1,3 +1,4 @@
{% load helpers %}
{% if customfield.type == 'integer' and value is not None %}
{{ value }}
{% elif customfield.type == 'longtext' and value %}
@ -6,6 +7,8 @@
{% checkmark value true="True" %}
{% elif customfield.type == 'boolean' and value == False %}
{% checkmark value false="False" %}
{% elif customfield.type == 'date' and value %}
{{ value|annotated_date }}
{% elif customfield.type == 'url' and value %}
<a href="{{ value }}">{{ value|truncatechars:70 }}</a>
{% elif customfield.type == 'json' and value %}