Преглед изворни кода

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 година
родитељ
комит
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'),