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

Closes #7925: Linkify contact phone and email attributes

This commit is contained in:
jeremystretch
2021-12-03 10:51:24 -05:00
parent 3b25db919a
commit 68f322a03b
4 changed files with 36 additions and 4 deletions

View File

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