make sure that the description columns get wrapped properly

This commit is contained in:
Andreas Zweili 2020-08-03 21:35:20 +02:00
parent 746054c295
commit d2c5c03d12
4 changed files with 28 additions and 1 deletions

View File

@ -6,7 +6,13 @@ from core.tables import CoreTable
class ComputersTable(CoreTable):
name = tables.Column('Computer', linkify=True)
description = tables.Column()
description = tables.Column(
attrs={
'td': {
'class': 'text-truncate',
'style': 'max-width: 150px;'}
}
)
serialnumber = tables.Column()
owner = tables.Column()
manufacturer = tables.Column()

View File

@ -11,6 +11,13 @@ from .models import Device
class DevicesTable(CoreTable):
id = tables.Column(visible=False)
name = tables.Column('Device', linkify=True)
description = tables.Column(
attrs={
'td': {
'class': 'text-truncate',
'style': 'max-width: 150px;'}
}
)
delete = tables.LinkColumn('device_delete',
text='delete',
args=[A('pk')], attrs={

View File

@ -11,6 +11,13 @@ class NetsTable(CoreTable):
id = tables.Column(visible=False)
name = tables.Column('Net', linkify=True)
customer = tables.Column('Customer', linkify=True)
description = tables.Column(
attrs={
'td': {
'class': 'text-truncate',
'style': 'max-width: 150px;'}
}
)
delete = tables.LinkColumn('net_delete',
text='delete',
args=[A('pk')], attrs={

View File

@ -9,6 +9,13 @@ from .models import User
class UsersTable(CoreTable):
id = tables.Column(visible=False)
name = tables.Column('User', linkify=True)
description = tables.Column(
attrs={
'td': {
'class': 'text-truncate',
'style': 'max-width: 150px;'}
}
)
customer = tables.Column('Customer', linkify=True)
ad_groups = tables.ManyToManyColumn()
mail_groups = tables.ManyToManyColumn()