mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
10655 fix contacts display in list views (#10681)
* 10655 fix contacts display in list views * 10655 review changes
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import django_tables2 as tables
|
||||
|
||||
from netbox.tables import columns
|
||||
|
||||
__all__ = (
|
||||
'ContactsColumnMixin',
|
||||
'TenantColumn',
|
||||
'TenantGroupColumn',
|
||||
'TenancyColumnsMixin',
|
||||
@@ -55,3 +58,10 @@ class TenantGroupColumn(tables.TemplateColumn):
|
||||
class TenancyColumnsMixin(tables.Table):
|
||||
tenant_group = TenantGroupColumn()
|
||||
tenant = TenantColumn()
|
||||
|
||||
|
||||
class ContactsColumnMixin(tables.Table):
|
||||
contacts = columns.ManyToManyColumn(
|
||||
linkify_item=True,
|
||||
transform=lambda obj: obj.contact.name
|
||||
)
|
||||
|
Reference in New Issue
Block a user