2019-08-02 13:05:42 +02:00
|
|
|
import django_tables2 as tables
|
2020-08-03 16:35:10 +02:00
|
|
|
from django_tables2.utils import A
|
2019-08-02 13:05:42 +02:00
|
|
|
|
2020-02-23 12:58:39 +01:00
|
|
|
from core.tables import CoreTable
|
2019-12-11 17:52:50 +01:00
|
|
|
|
2020-02-29 21:05:18 +01:00
|
|
|
|
2020-02-23 12:58:39 +01:00
|
|
|
class ComputersTable(CoreTable):
|
2019-12-30 00:19:24 +01:00
|
|
|
name = tables.Column('Computer', linkify=True)
|
2020-08-03 21:35:20 +02:00
|
|
|
description = tables.Column(
|
|
|
|
attrs={
|
|
|
|
'td': {
|
|
|
|
'class': 'text-truncate',
|
|
|
|
'style': 'max-width: 150px;'}
|
|
|
|
}
|
|
|
|
)
|
2019-08-02 13:05:42 +02:00
|
|
|
serialnumber = tables.Column()
|
|
|
|
owner = tables.Column()
|
|
|
|
manufacturer = tables.Column()
|
2020-02-14 20:26:24 +01:00
|
|
|
model = tables.Column()
|
2019-08-02 13:05:42 +02:00
|
|
|
location = tables.Column()
|
2020-01-01 19:58:53 +01:00
|
|
|
user = tables.Column('User', linkify=True)
|
2019-08-02 13:05:42 +02:00
|
|
|
installation_date = tables.Column()
|
|
|
|
os = tables.Column()
|
2020-08-03 16:35:10 +02:00
|
|
|
delete = tables.LinkColumn('device_delete',
|
|
|
|
text='delete',
|
|
|
|
args=[A('pk')], attrs={
|
|
|
|
'a': {'class': 'delete material-icons', }
|
2020-08-03 17:37:08 +02:00
|
|
|
}, orderable=False)
|
2019-08-02 13:05:42 +02:00
|
|
|
|
2020-02-23 12:58:39 +01:00
|
|
|
class Meta(CoreTable.Meta):
|
|
|
|
pass
|