Просмотр исходного кода

Fixes: #17072 - Make active links of phone and email in Contact Assignments table (#17233)

* Add linkify_email and apply with linkify_phone to ContactAssignmentTable

* Use EmailColumn instead of linkify_email
bctiemann 1 год назад
Родитель
Сommit
8903e4649c
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      netbox/tenancy/tables/contacts.py

+ 4 - 3
netbox/tenancy/tables/contacts.py

@@ -113,11 +113,12 @@ class ContactAssignmentTable(NetBoxTable):
     )
     contact_phone = tables.Column(
         accessor=Accessor('contact__phone'),
-        verbose_name=_('Contact Phone')
+        verbose_name=_('Contact Phone'),
+        linkify=linkify_phone,
     )
-    contact_email = tables.Column(
+    contact_email = tables.EmailColumn(
         accessor=Accessor('contact__email'),
-        verbose_name=_('Contact Email')
+        verbose_name=_('Contact Email'),
     )
     contact_address = tables.Column(
         accessor=Accessor('contact__address'),