mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Initial support for table column reordering
This commit is contained in:
@@ -164,7 +164,8 @@ class ObjectListView(View):
|
||||
permissions[action] = request.user.has_perm(perm_name)
|
||||
|
||||
# Construct the table based on the user's permissions
|
||||
table = self.table(self.queryset)
|
||||
columns = request.user.config.get(f"tables.{self.table.__name__}.columns")
|
||||
table = self.table(self.queryset, columns=columns)
|
||||
if 'pk' in table.base_columns and (permissions['change'] or permissions['delete']):
|
||||
table.columns.show('pk')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user