diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md
index a8422c208..11e034fca 100644
--- a/docs/release-notes/version-3.1.md
+++ b/docs/release-notes/version-3.1.md
@@ -15,7 +15,7 @@
* [#7812](https://github.com/netbox-community/netbox/issues/7812) - Enable change logging for image attachments
* [#7858](https://github.com/netbox-community/netbox/issues/7858) - Standardize the representation of content types across import & export functions
* [#7884](https://github.com/netbox-community/netbox/issues/7884) - Add FHRP groups column to interface tables
-* [#7940](https://github.com/netbox-community/netbox/issues/7940) - Add ITA multistandard outlet
+* [#7925](https://github.com/netbox-community/netbox/issues/7925) - Linkify contact phone and email attributes
### Bug Fixes
diff --git a/netbox/templates/tenancy/contact.html b/netbox/templates/tenancy/contact.html
index 79878b1ac..2c7cef040 100644
--- a/netbox/templates/tenancy/contact.html
+++ b/netbox/templates/tenancy/contact.html
@@ -37,11 +37,23 @@
Phone |
- {{ object.phone|placeholder }} |
+
+ {% if object.phone %}
+ {{ object.phone }}
+ {% else %}
+ None
+ {% endif %}
+ |
Email |
- {{ object.email|placeholder }} |
+
+ {% if object.phone %}
+ {{ object.email }}
+ {% else %}
+ None
+ {% endif %}
+ |
Address |
diff --git a/netbox/tenancy/tables.py b/netbox/tenancy/tables.py
index ff9f826ae..0ae1139bf 100644
--- a/netbox/tenancy/tables.py
+++ b/netbox/tenancy/tables.py
@@ -1,7 +1,8 @@
import django_tables2 as tables
from utilities.tables import (
- BaseTable, ButtonsColumn, ContentTypeColumn, LinkedCountColumn, MarkdownColumn, MPTTColumn, TagColumn, ToggleColumn,
+ BaseTable, ButtonsColumn, ContentTypeColumn, LinkedCountColumn, linkify_phone, MarkdownColumn, MPTTColumn,
+ TagColumn, ToggleColumn,
)
from .models import *
@@ -131,6 +132,9 @@ class ContactTable(BaseTable):
group = tables.Column(
linkify=True
)
+ phone = tables.Column(
+ linkify=linkify_phone,
+ )
comments = MarkdownColumn()
assignment_count = tables.Column(
verbose_name='Assignments'
diff --git a/netbox/utilities/tables.py b/netbox/utilities/tables.py
index 6ad8ce6ca..7b348b5ac 100644
--- a/netbox/utilities/tables.py
+++ b/netbox/utilities/tables.py
@@ -489,3 +489,19 @@ def paginate_table(table, request):
'per_page': get_paginate_count(request)
}
RequestConfig(request, paginate).configure(table)
+
+
+#
+# Callables
+#
+
+def linkify_email(value):
+ if value is None:
+ return None
+ return f"mailto:{value}"
+
+
+def linkify_phone(value):
+ if value is None:
+ return None
+ return f"tel:{value}"